backticks — tagged template literals — breaking Marked 2 preview
I've been using Marked (and now Marked 2) for quite some time and like it very much.
I'm having a problem with code that has backticks within it. I've read the materials and the solution to use fenced code blocks isn't working for me. Marked 2 seems to hang.
I've attached a sample of the preview. Pasting the problematic code into this comment doesn't really work. But it's straightforward enough — using backticks within fenced code blocks isn't working for me.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
1 Posted by cwerby on 31 Oct, 2020 11:11 PM
Never mind. I discovered that the problem goes away if I open the file directly in Marked 2. I was using BBEdit's "Preview in Marked 2" command which works for everything else but appears to choke on backticks.
cwerby closed this discussion on 31 Oct, 2020 11:11 PM.
Brett re-opened this discussion on 01 Nov, 2020 02:35 AM
Support Staff 2 Posted by Brett on 01 Nov, 2020 02:35 AM
Yes, I believe you'll need to indent the block containing backticks rather than fencing it (4 spaces or one tab). The nested backticks confuse Marked's handling.