Skip to content

Commit

Permalink
perf: better checking mathjax expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreytse committed Dec 2, 2020
1 parent 32d1b44 commit a2fb64a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/jekyll-spaceship/processors/mathjax-processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def get_math_patterns()
def scan_mathjax_expression(doc, &block)
patterns = get_math_patterns()
doc.css('*').each do |node|
next if node.ancestors('code, pre').size > 0
next if ['code', 'pre', 'figure'].include? node.name
next if node.ancestors('code, pre, figure').size > 0
next if node.children.size > 1
patterns['include'].each do |pattern|
# check scripting mathjax expression
Expand Down

0 comments on commit a2fb64a

Please sign in to comment.