-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Context
I'm using code fence parameters for my pandoc pipeline to render plantuml diagrams using pandoc's diagram filter. Unfortunately, the mandatory syntax ```{#fig:use-cases .plantuml caption="foo"} causes codimd to throw an error while parsing the parameters.
Workaround
Switch to Edit-Mode (by changing the URL's query param to ?edit) and remove the causing line.
Cause
codimd is capable of parsing the expression above, the function is called parseFenceCodeParams. There is a Not-Operator missing that causes the class property to never be initialized. The next line fails due to the uninitialized property.
codimd/public/js/lib/markdown/utils.js
Lines 12 to 13 in ded6b58
| if (params.class) params.class = [] | |
| params.class = params.class.concat(param.slice(1)) |
Metadata
Metadata
Assignees
Labels
No labels