Open mootari opened 2 years ago
Aside: I originally intended to have two separate lists. In marked up until version 3.0.0 this can be achieved by separating the lists with two newlines.
From version 3.0.0 and onward marked follows commonmark, which requires a hack to separate the lists.
We can’t upgrade Marked (used by our md
tagged template literal and by extension Markdown cells) until we support standard library versioning. Otherwise we would almost certainly break countless notebooks. Once we have standard library versioning, new notebooks will get a new version of Marked, and old notebooks will be able to opt-in to upgrade.
I have a few more weird behaviors…
_Underscore italics_
_Underscore italics with `a_variable_name` embedded_
produces this HTML code (second line ignores the italics):
<p><em>Underscore italics</em></p>
<p>_Underscore italics with <code>a_variable_name</code> embedded_</p>
This works correctly when using asterisks instead of underscores.
This code
Here are escaped backticks \`md\`, and here they are un-escaped inside a code block: `md``` hello
But they work when there's a space: `md`` ` back to normal
produces this output (backticks are sometimes ignored):
<p>Here are escaped backticks `md`, and here they are un-escaped inside a code block: `md``` hello</p>\n<p>But they work when there's a space: <code>md``</code> back to normal</p>
The backtick issues are fixed in the current version, but the underscore confusion seems to persist (but looks a little different). See this test in the Marked playground.
Another one, which is resolved in newer version of marked:
- [ ] foo
- [X] fooxx
Should be:
Given the following Markdown containing a "loose list":
the generated HTML wraps multiple elements in paragraphs:
resulting in the following appearance:![image](https://user-images.githubusercontent.com/322014/145676848-ecb7a58d-5aa4-47a3-9a6e-b177ad528e53.png)
Observable currently uses marked 0.3.12. This bug got fixed in marked 0.5.0 (demo, PR).