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|
|
||||
render(false, $~[1])
|
||||
end
|
||||
rendered = rendered.gsub /\$\$((?:[^\$]|$[^\$])*)\$\$/ do |match|
|
||||
rendered = rendered.gsub /\$\$(.*?)\$\$/ do |match|
|
||||
render(true, $~[1])
|
||||
end
|
||||
return rendered
|
||||
|
|
Loading…
Reference in New Issue
Block a user