Use a non-greedy match for the double-dollar-sign escaping
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
7c65afbc93
commit
5ab0d0d40e
|
@ -28,7 +28,7 @@ class KatexRenderer
|
||||||
rendered = content.gsub /\\\(((?:[^\\]|\\[^\)])*)\\\)/ do |match|
|
rendered = content.gsub /\\\(((?:[^\\]|\\[^\)])*)\\\)/ do |match|
|
||||||
render(false, $~[1])
|
render(false, $~[1])
|
||||||
end
|
end
|
||||||
rendered = rendered.gsub /\$\$((?:[^\$]|$[^\$])*)\$\$/ do |match|
|
rendered = rendered.gsub /\$\$(.*?)\$\$/ do |match|
|
||||||
render(true, $~[1])
|
render(true, $~[1])
|
||||||
end
|
end
|
||||||
return rendered
|
return rendered
|
||||||
|
|
Loading…
Reference in New Issue
Block a user