mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-22 14:56:19 +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" -}}
|
{{- $source := $cdn.katexMhchemJS | default "lib/katex/mhchem.min.js" -}}
|
||||||
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $delimiters := slice (dict "left" "$" "right" "$" "display" false) (dict "left" "\\(" "right" "\\)" "display" false) -}}
|
{{- $delimiters := slice (dict "left" "$$" "right" "$$" "display" true) (dict "left" "\\[" "right" "\\]" "display" true) -}}
|
||||||
{{- 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 = $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{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) -}}
|
{{- $delimiters = $delimiters | append (dict "left" "\\begin{align}" "right" "\\end{align}" "display" true) -}}
|
||||||
|
@ -122,6 +118,10 @@
|
||||||
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||||
{{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}}
|
{{- $delimiters = $delimiters | append (dict "left" $math.blockLeftDelimiter "right" $math.blockRightDelimiter "display" true) -}}
|
||||||
{{- end -}}
|
{{- 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 -}}
|
{{- $config = dict "strict" false "delimiters" $delimiters | dict "math" | merge $config -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue