dotnet / dotnet/fsharp

Xml documentation code section does not respect multiline

Open
#12,601 1 comment 0 reactions 0 assignees View on GitHub
Area-XmlDocs Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Xml-documentation-code-section-does-not-/1528203)._

---
[severity:It bothers me. A fix would be nice]
In Elmish.WPF (see https://github.com/elmish/Elmish.WPF/issues/417#issue-978682895), we are using the `` tag to specify a multiline code sample.

According to the [documentation](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/xml-documentation#recommended-tags):

> Specifies that text is multiple lines of code. This tag can be used by documentation generators to display text in a font that is appropriate for code.

Here is the code:

```
///
/// Accepts a function that can alter the message stream.
/// Ideally suited for use with Reactive Extensions.
///
/// open FSharp.Control.Reactive
/// let delay dispatch =
/// let subject = Subject.broadcast
/// let observable = subject :> System.IObservable<_>
/// observable
/// |> Observable.delay (System.TimeSpan.FromSeconds 1.0)
/// |> Observable.subscribe dispatch
/// |> ignore
/// subject. OnNext
///
/// // ...
///
/// binding |> Binding.alterMsgStream delay
///

///
/// The function that will alter the message stream.
/// The binding to which the message stream is altered.
```

But inside Visual Studio 2019, the tooltip doesn't respect the code formatting, see the following screenshot>

! [image.png] (https://aka.ms/dc/image?name=B99d64544d50b4184ab3b8b255afa1048637671589014723268_20210913-214138-image.png&tid=99d64544d50b4184ab3b8b255afa1048637671589014723268)

---
### Original Comments

#### Feedback Bot on 9/13/2021, 11:16 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Feedback Bot on 1/4/2022, 00:01 AM:

I detected that this issue hasn’t received a lot of activity, votes, or comments in the past 90 days. Based on this, the issues severity and affected area, it’s my experience that this issue is unlikely to get fixed. To improve the situation, consider following best practices for quality problem reports, and giving us more details on how this issue is impacting you.

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.