get rid of useless latex parsing code

This commit is contained in:
Michael Zhang 2018-05-28 12:14:02 -05:00
parent c383893e77
commit 133e035510
No known key found for this signature in database
GPG key ID: A1B65B603268116B

View file

@ -1,33 +1,5 @@
require "mathematical"
# module Jekyll
# class LatexGenerator < Generator
# safe true
# def generate(site)
# blockRgx = /\$\$[^\$]+\$\$/
# site.posts.each do |post|
# buf = StringIO.new
# prev = 0
# post.content.to_enum(:match, blockRgx).with_index.each do |match, i|
# a, b = match.offset(i)
# buf << post.content[prev..a]
# render = Mathematical.new.render(match[i])
# buf << render[:data]
# prev = b
# end
# buf << post.content[prev..post.content.length]
# p buf.string
# end
# inlineRgx = /[^\$]\$[^\$]+\$[^\$]/
# site.posts.each do |post|
# p post.content.scan(inlineRgx)
# end
# end
# end
# end
$blockRgx = /((?<block>\$\$[^\$]+\$\$)|[^\$](?<inline>\$[^\$]+\$)[^\$])/
module Jekyll