fix: multiline code block #87
This commit is contained in:
		
							parent
							
								
									16b177ce66
								
							
						
					
					
						commit
						91c4e3fb3a
					
				
					 2 changed files with 7 additions and 4 deletions
				
			
		| 
						 | 
					@ -23,8 +23,7 @@ Aligned equations work quite well:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$$
 | 
					$$
 | 
				
			||||||
\begin{aligned}
 | 
					\begin{aligned}
 | 
				
			||||||
a &= b + c \\
 | 
					a &= b + c \\ &= e + f \\
 | 
				
			||||||
 &= e + f \\
 | 
					 | 
				
			||||||
\end{aligned}
 | 
					\end{aligned}
 | 
				
			||||||
$$
 | 
					$$
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -32,7 +31,7 @@ And matrices
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$$
 | 
					$$
 | 
				
			||||||
\begin{bmatrix}
 | 
					\begin{bmatrix}
 | 
				
			||||||
1 & 2 & 3\\
 | 
					1 & 2 & 3 \\
 | 
				
			||||||
a & b & c
 | 
					a & b & c
 | 
				
			||||||
\end{bmatrix}
 | 
					\end{bmatrix}
 | 
				
			||||||
$$
 | 
					$$
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,11 @@
 | 
				
			||||||
{{ $content = replace $content "->" "→" }}
 | 
					{{ $content = replace $content "->" "→" }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{{/* Escape slashes for Latex to fix line breaks */}}
 | 
					{{/* 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 */}}
 | 
				
			||||||
{{$wikilinks := $content | findRE "\\[\\[[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\]\\]" }}
 | 
					{{$wikilinks := $content | findRE "\\[\\[[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\]\\]" }}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue