-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support markdown in documentation comments #237
Comments
Just to note the markdown comments accepted by FSharp.Formatting are documented here: https://fsprojects.github.io/FSharp.Formatting/apidocs.html#Markdown-Comments |
Also, this RFC is orthogonal but relevant https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1031-xmldoc-extensions.md |
I'm not opposed to supporting Markdown as a purely stylistic mechanism. However, I'd be really disappointed if folks (i.e. tooling authors) started attaching semantic meaning to various Markdown (really HTML) constructs. Though, I'll admit, I'm not sure if there's a good way to enforce "use XML for semantics; use Markdown for styling" (especially since the tooling suggesting linked above advocates for honouring a few basic HTML constructs). |
Two points I think need to be kept in mind:
So if we want to be able to use markdown in summaries and have them show up nicely in all editors, the transformation from markdown to HTML must be done by the compiler when generating the XML file. We would probably want to keep this markdown transformation pretty simple, supporting basic markdown syntax only, for the sake of not bringing too much complexity into the compiler. But we also don't want to prevent people from using advanced markdown extensions in their own reference documentation (using FSharp.Formatting or any other custom tool) if they want to! So maybe we should transform tooltip tags to HTML but leave refdoc tags alone? |
Brief side note here that we've reverted this default functionality in FSAC/Ionide and now only generate XML documentation. We do transform the generated docs into markdown for VSCode, but that's only because the LSP spec for tooltips requires that, we're working from full-fidelity XML as the root data source. |
Ah, thanks for the info, I didn't know that! |
These would have to be in some specialized node that C# and VB can ignore. Of course that would also mean that any future work to additionally support markdown in C#-emitted XML docs would complicate matters :) |
Submitted by Anonymous on 4/2/2014 12:00:00 AM
19 votes on UserVoice prior to migration
F# currently supports documentation comments with either XML tags or no tags. The no tags format is convenient to write, but does not allow formatting the comments for the VS IDE. Use of XML tags allows formatting the documentation comment, but the act of writing the documentation comment becomes a heavy burden as XML is not a very convenient format for manual editing. I would like to suggest supporting some lighter-weight formatting syntax such as markdown.
Original UserVoice Submission
Archived Uservoice Comments
The text was updated successfully, but these errors were encountered: