Apex spuriously URL-encoding text

Viewed 3

I had some lines of dialogue, of the form

CHARACTER (stage directions): Here’s some dialogue.

which are rendered in Marked 3.2.17 as

CHARACTER [stage directions]: Here%E2%80%99s%20some%20dialogue.

when I have Apex selected as the processor. All the other processors render if correctly.

I've tried various changes in an attempt to isolate the problem, but I can't pin it down. Adding a space between the ] and : fixes it, so does changing one or both square brackets to round ones. If there's nothing before the opening bracket, the whole paragraph just disappears.

I've attached a wee test file.
apex-bug.md

1 Answers

Thanks for the report. It's treating []: xxx as a link definition, which it url encodes to allow spaces and attributes. If there's text before the opening square bracket, though, it should be ignoring the syntax, so I'll look into that. With nothing before the opening square bracket, it's correctly identifying it as a url reference, and with no matching url marker in the text, it will just disappear, so that's expected. If you want to start a paragraph with [xxx]: you need to backslash escape the opening square bracket (\[).