FSharp.Formatting icon indicating copy to clipboard operation
FSharp.Formatting copied to clipboard

Make F# Formatting compatible with CommonMark

Open kimsk opened this issue 10 years ago • 7 comments

There is an attempt to standardized Markdown at CommonMark which I think it's a good idea.

I tried FSharp.Formatting with the sample that Jeff Atwood gives, and the output html is below.

<h1>Hello there</h1>

<p>This is a paragraph.</p>

<ul>
<li>one</li>
<li>two</li>
<li>three</li>
<li><p>four</p></li>
<li>pirate</li>
<li>ninja</li>
<li>zombie</li>
</ul>

I just want to throw the idea around. :-)

kimsk avatar Sep 05 '14 17:09 kimsk

Looks like F# Formatting is definitely not doing a good job here :-)

Any pull requests that make our implementation closer to the CommonMark format (or whatever it is called today) would be more than welcome.

  • I know for sure that the parsing of lists is a mess and needs to be changed!
  • The other area is that common markdown describes how to deal with multiple *nested **emphasis** commands* (by taking the space into account), which would be nice addition too.
  • It would also be nice to see if there are any tests in CommonMark that we could adopt.

tpetricek avatar Sep 07 '14 12:09 tpetricek

This is now in progress since https://github.com/tpetricek/FSharp.Formatting/pull/343, feel free to enable one of the sections here, fix all the enabled tests and send a PR ;)

I hope I find some time to add some more documentation here: http://tpetricek.github.io/FSharp.Formatting/development.html

matthid avatar Dec 29 '15 23:12 matthid

I've made some progress on this: #404

theprash avatar May 14 '16 14:05 theprash

Closing as progress was made in #343 and #404, there are no disabled tests remaining in the linked test?

dsyme avatar Apr 13 '19 00:04 dsyme

@dsyme you're staying up too long :D

realvictorprm avatar Apr 13 '19 03:04 realvictorprm

We have ported all tests from the spec and the numbers are:

Total tests: 707. Passed: 157. Failed: 0. Skipped: 550

So I'd say we aren't anywhere near the spec ;)

matthid avatar Apr 13 '19 08:04 matthid

Ah cool, good to have the update!

dsyme avatar Apr 13 '19 18:04 dsyme