Skip to content

Commit a9a7452

Browse files
committed
fix: unable to use cases extension of mathjax (#59)
1 parent 4c34f48 commit a9a7452

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/jekyll-spaceship/processors/mathjax-processor.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def on_handle_markdown(content)
4545
escaped_expr = expr
4646
.gsub(/(?<!^)\\(?!\S$)/, '\\\\\\\\')
4747
.gsub(/(?<!\\)\$\$/, '\\\$\\\$')
48+
.gsub(/\\\\(?=\s)/, '\\\\\\\\\\')
4849
.gsub(/\\ /, '\\\\\\ ')
4950
content = content.gsub(expr, escaped_expr)
5051
end
@@ -92,7 +93,7 @@ def get_math_patterns()
9293
r&.each do |i|
9394
btag = Regexp.escape(i[0])
9495
etag = Regexp.escape(i[1])
95-
patterns <<= /((?<!\\\\)#{btag}(.*?)(?<!\\\\)#{etag})/
96+
patterns <<= /((?<!\\\\)#{btag}([\s\S]*?)(?<!\\\\)#{etag})/
9697
end
9798
end
9899
end

0 commit comments

Comments
 (0)