Skip to content
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

formatting code samples in markdown files (fsharp blocks) and <code> elements in xml comments? #2982

Open
3 of 6 tasks
smoothdeveloper opened this issue Nov 14, 2023 · 1 comment

Comments

@smoothdeveloper
Copy link
Contributor

smoothdeveloper commented Nov 14, 2023

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!)

@nojaf
Copy link
Contributor

nojaf commented Nov 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants