Do not render math inside code blocks.
This commit is contained in:
parent
2fb5691596
commit
1b175b739b
|
@ -26,7 +26,7 @@ files = ARGV[0..-1]
|
|||
files.each do |file|
|
||||
puts "Rendering file: #{file}"
|
||||
document = Nokogiri::HTML.parse(File.open(file))
|
||||
document.search('//text()').each do |t|
|
||||
document.search('//*[not(self::code)]/text()').each do |t|
|
||||
t.replace(perform_katex_sub(t.content))
|
||||
end
|
||||
File.write(file, document.to_html)
|
||||
|
|
Loading…
Reference in New Issue
Block a user