Zettelkasten Forum

Bug: Issues with code blocks

Hi all,

Absolutely love The Archive. Not sure how I lived before it, and would find it very difficult to live without it now!

Just wanted to post a quick bug report.

Version: 1.4.6 (latest according to the auto-updater).

When I paste in a code block and then try to surround it in backticks (`), or type the backticks first and then paste the code, I see the following weirdness:

My best guess is that the pasting is not truly plain text pasting and so weird encoding characters are throwing things off, but honestly it's a bit out of my wheelhouse. Definitely a problem with text encoding, though.

On a related note, it would be great if the third backtick did not get a paired backtick. As you see in the gif, when I type a backtick it always gets a partner, but this means that when going for the markdown triple-backtick to open or close a code block, I always have to delete one.

For reference, what I'm trying to do here is:

some code


  • Thanks for reporting this!

    The backtick pairing is on my to-do list when the Markdown highlighter is updated.

    The weird character mangling you see is oddly enough related to the change of the highlighted region. (If anyone else is watching: it's the NSLayoutManager layout pass.) This stuff happened for a while on macOS 10.11 but eventually got sorted out.

    • Which macOS version are you running?
    • Can you email me a file where adding the last backtick-pair, then removing the 4th backtick triggers this?

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.