fantomas
fantomas copied to clipboard
formatting code samples in markdown files (fsharp blocks) and <code> elements in xml comments?
I propose fantomas goes where code formatters rarely go, for code that is most displayed to large audience: code documentation.
- F# codeblocks in markdown files
- code elements (identified as being F#) in xml comments of .net projects
- maybe F# code samples in sandcastle doc
Pros
- consistent formatting in F# code shown in documentation
Cons
- may require third party deps, or work on writing parsers/printers for formats that are alien to fantomas
Extra information
Estimated cost (XS, S, M, L, XL, XXL): M or L
Related suggestions: (put links to related suggestions here)
Affidavit (please submit!)
- [x] I have read the Contribution Guidelines.
- [x] I have searched both open and closed suggestions on this site and believe this is not a duplicate
- [x] This is not a breaking change to Fantomas
- [ ] I or my company would be willing to help implement and/or test this
- [ ] This suggestion is part of the Microsoft style guide (please add a link to section if so)
- [ ] This suggestion is part of the G-Research style guide (please add a link to section if so)
This seems like something some tool or script could do outside of Fantomas using Fantomas.Core.
Side note, FSharp.Formatting scripts can be formatted because they are just scripts.