DocTest
DocTest copied to clipboard
Support tilde fenced code block delimiters
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.