Skip to content

Commit

Permalink
Fixes syntactical errors - fixes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
tstumm authored Jul 10, 2020
1 parent 9a45272 commit a706c20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/asciidoctor-mathematical/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def handle_inline_stem(node, text, mathematical, image_output_dir, image_target_
source_modified = false

# TODO skip passthroughs in the source (e.g., +stem:[x^2]+)
if text != nil && text.include? ':'
if text != nil && (text.include? ':')
text = text.gsub(stem_rx) {
if (m = $~)[0].start_with? '\\'
next m[0][1..-1]
Expand All @@ -167,7 +167,7 @@ def handle_inline_stem(node, text, mathematical, image_output_dir, image_target_

if text.include? 'asciimath:'
eq_data = AsciiMath.parse(eq_data).to_latex
else if (support_stem_prefix && (text.include? 'stem:')) || (text.include? 'latexmath:')
elsif (support_stem_prefix && (text.include? 'stem:')) || (text.include? 'latexmath:')
eq_data.gsub! '\]', ']'
subs = m[1].nil_or_empty? ? (to_html ? [:specialcharacters] : []) : (node.resolve_pass_subs m[1])
eq_data = node.apply_subs eq_data, subs unless subs.empty?
Expand Down

0 comments on commit a706c20

Please sign in to comment.