backticks — tagged template literals — breaking Marked 2 preview

cwerby's Avatar


31 Oct, 2020 10:34 PM

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.

  1. 1 Posted by cwerby on 31 Oct, 2020 11:11 PM

    cwerby's Avatar

    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.

  2. cwerby closed this discussion on 31 Oct, 2020 11:11 PM.

  3. Brett re-opened this discussion on 01 Nov, 2020 02:35 AM

  4. Support Staff 2 Posted by Brett on 01 Nov, 2020 02:35 AM

    Brett's Avatar

    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.

    - Brett

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 2020-10-31-Marked_2_Preview_Error_with_Tagged_Template_Literals-CW-screenshot-ref-UNC-1848x1144.png 640 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac