mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
markdown-it-texmath: add constraint to the end of the block equation
This commit is contained in:
parent
d2e054994b
commit
d06dcc36f5
@ -102,7 +102,7 @@ texmath.rules = {
|
|||||||
],
|
],
|
||||||
block: [
|
block: [
|
||||||
{ name: 'math_block',
|
{ name: 'math_block',
|
||||||
rex: /\\\[(.+?)\\\]/gmy,
|
rex: /\\\[(.+?)\\\]\s*$/gmy,
|
||||||
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
||||||
tag: '\\['
|
tag: '\\['
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ texmath.rules = {
|
|||||||
],
|
],
|
||||||
block: [
|
block: [
|
||||||
{ name: 'math_block',
|
{ name: 'math_block',
|
||||||
rex: /`{3}math\s+?([^`]+?)\s+?`{3}/gmy,
|
rex: /`{3}math\s+?([^`]+?)\s+?`{3}\s*$/gmy,
|
||||||
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
||||||
tag: '```math'
|
tag: '```math'
|
||||||
}
|
}
|
||||||
@ -143,7 +143,7 @@ texmath.rules = {
|
|||||||
],
|
],
|
||||||
block: [
|
block: [
|
||||||
{ name: 'math_block',
|
{ name: 'math_block',
|
||||||
rex: /\${2}([^$]*?)\${2}/gmy,
|
rex: /\${2}([^$]*?)\${2}\s*$/gmy,
|
||||||
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
tmpl: '<x-eqn class="tex-to-render">$1</x-eqn>',
|
||||||
tag: '$$'
|
tag: '$$'
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user