summaryrefslogtreecommitdiffstats
path: root/_plugins/singledollar.rb
diff options
context:
space:
mode:
authorJustin Gassner <justin.gassner@mailbox.org>2024-02-15 05:11:07 +0100
committerJustin Gassner <justin.gassner@mailbox.org>2024-02-15 05:11:07 +0100
commit7c66b227a494748e2a546fb85317accd00aebe53 (patch)
tree9c649667d2d024b90b32d36ca327ac4b2e7caeb2 /_plugins/singledollar.rb
parent28407333ffceca9b99fae721c30e8ae146a863da (diff)
downloadsite-7c66b227a494748e2a546fb85317accd00aebe53.tar.zst
Update
Diffstat (limited to '_plugins/singledollar.rb')
-rw-r--r--_plugins/singledollar.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/_plugins/singledollar.rb b/_plugins/singledollar.rb
index fe665ab..bb1f10c 100644
--- a/_plugins/singledollar.rb
+++ b/_plugins/singledollar.rb
@@ -4,16 +4,16 @@ require 'kramdown/parser/kramdown'
require 'kramdown-parser-gfm'
class Kramdown::Parser::GFMKatex < Kramdown::Parser::GFM
- # Override inline math parser
- @@parsers.delete(:inline_math)
+ # Override inline math parser
+ @@parsers.delete(:inline_math)
- INLINE_MATH_START = /(\$+)([^\$]+)(\$+)/m
+ INLINE_MATH_START = /(\$+)([^\$]+)(\$+)/m
- def parse_inline_math
- start_line_number = @src.current_line_number
- @src.pos += @src.matched_size
- @tree.children << Element.new(:math, @src.matched[1..-2], nil, category: :span, location: start_line_number)
- end
+ def parse_inline_math
+ start_line_number = @src.current_line_number
+ @src.pos += @src.matched_size
+ @tree.children << Element.new(:math, @src.matched[1..-2], nil, category: :span, location: start_line_number)
+ end
- define_parser(:inline_math, INLINE_MATH_START, '\$')
+ define_parser(:inline_math, INLINE_MATH_START, '\$')
end