Massive-Wiki / massivewikibuilder

Massive Wiki Builder
MIT License
3 stars 3 forks source link

Double-asterisk string doesn't turn bold if there's a space at the end #60

Closed peterkaminski closed 5 months ago

peterkaminski commented 5 months ago

Needs more testing, but it appears that this string (note space before final **) is not parsed as markdown; it is output just as is, with asterisks, and not bold.

**This line should be bold **

To close this ticket:

band commented 5 months ago

I did some experiments and looked at the CommonMark spec, and at how mistletoe handles things. Some findings:

  1. the CommonMark spec does not recognize ** as a legal trailing mark in a bold markup starting with **. (see https://spec.commonmark.org/0.31.2/#emphasis-and-strong-emphasis)
  2. mistletoe behavior for the few examples I tried supports this aspect of the spec.
  3. FWIW, my Emacs markdown-mode also supports the spec.
  4. Obsidian does not appear to honor this part of the spec. (I see that as an Obsidian bug)
  5. bold markup can span newlines but the trailing mark cannot have a leading space (mistletoe)
peterkaminski commented 5 months ago

Thanks for checking, Bill!

Let's close as WONTFIX for now, and come back someday and check out why Obsidian works the way it does, and also check Gruber's parser: https://github.com/wkpark/markdown-testsuite

We should also add a usage note to the docs someday.