fix: multiline code block #87
| | |
| | | |
| | | $$ |
| | | \begin{aligned} |
| | | a &= b + c \\ |
| | | &= e + f \\ |
| | | a &= b + c \\ &= e + f \\ |
| | | \end{aligned} |
| | | $$ |
| | | |
| | |
| | | {{ $content = replace $content "->" "→" }} |
| | | |
| | | {{/* Escape slashes for Latex to fix line breaks */}} |
| | | {{ $content = replaceRE "\\\\ *\n" "\\\\" $content }} |
| | | {{$latex := findRE "\\$\\$([^\\$]+)\\$\\$" $content}} |
| | | {{range $latex}} |
| | | {{$fixed := replaceRE "\\\\(?: +|\\n)" "\\\\" .}} |
| | | {{$content = replace $content . $fixed}} |
| | | {{end}} |
| | | |
| | | {{/* Wikilinks */}} |
| | | {{$wikilinks := $content | findRE "\\[\\[[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\]\\]" }} |