From 133e035510ad7f7b27597de624391f701a9bf572 Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Mon, 28 May 2018 12:14:02 -0500 Subject: [PATCH] get rid of useless latex parsing code --- _plugins/latex.rb | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/_plugins/latex.rb b/_plugins/latex.rb index 59dbba6..f07429d 100644 --- a/_plugins/latex.rb +++ b/_plugins/latex.rb @@ -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 = /((?\$\$[^\$]+\$\$)|[^\$](?\$[^\$]+\$)[^\$])/ module Jekyll