mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
fix(math): block delimiters
This commit is contained in:
parent
264dd5b9d5
commit
66ccbe92af
1 changed files with 5 additions and 5 deletions
|
@ -106,11 +106,7 @@
|
|||
{{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
{{- $delimiters := slice (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}}
|
||||
{{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}}
|
||||
{{- end -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}}
|
||||
{{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" "\\begin{equation}" "right" "\\end{equation}" "display" true) -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" "\\begin{equation*}" "right" "\\end{equation*}" "display" true) -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" "\\begin{align}" "right" "\\end{align}" "display" true) -}}
|
||||
|
@ -122,6 +118,10 @@
|
|||
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}}
|
||||
{{- end -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}}
|
||||
{{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}}
|
||||
{{- $delimiters = $delimiters | append (dict "left" $math.inlineRightDelimiter "right" $math.inlineRightDelimiter "display" false) -}}
|
||||
{{- end -}}
|
||||
{{- $config = dict "strict" false "delimiters" $delimiters | dict "math" | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
Loading…
Reference in a new issue