DocTest icon indicating copy to clipboard operation
DocTest copied to clipboard

Support tilde fenced code block delimiters

Open mattt opened this issue 4 years ago • 0 comments

Currently, ``` is hard-coded into a regular expression pattern as the only delimiters for fenced code blocks. However, according to the CommonMark Spec:

4.5 Fenced code blocks

A code fence is a sequence of at least three consecutive backtick characters (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code block begins with a code fence, indented no more than three spaces.

We should either update the regular expression pattern to support both tildes and backticks, or alternatively provide an option to specify which delimiter to use.

mattt avatar May 04 '20 17:05 mattt