fix: multiline code block #87

hugo
Jacky Zhao 3 years ago
parent 16b177ce66
commit 91c4e3fb3a

@ -23,8 +23,7 @@ Aligned equations work quite well:
$$
\begin{aligned}
a &= b + c \\
&= e + f \\
a &= b + c \\ &= e + f \\
\end{aligned}
$$
@ -32,7 +31,7 @@ And matrices
$$
\begin{bmatrix}
1 & 2 & 3\\
1 & 2 & 3 \\
a & b & c
\end{bmatrix}
$$

@ -5,7 +5,11 @@
{{ $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 "\\[\\[[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\]\\]" }}

Loading…
Cancel
Save