Merge branch 'master' of https://dev.danilafe.com/DanilaFe/custom-nix
This commit is contained in:
commit
f57cb7273d
|
@ -29,7 +29,7 @@ inline_cache, display_cache = {}, {}
|
||||||
files.each do |file|
|
files.each do |file|
|
||||||
puts "Rendering file: #{file}"
|
puts "Rendering file: #{file}"
|
||||||
document = Nokogiri::HTML.parse(File.open(file))
|
document = Nokogiri::HTML.parse(File.open(file))
|
||||||
document.search('//*[not(self::code)]/text()').each do |t|
|
document.search('//*[not(ancestor-or-self::code)]/text()').each do |t|
|
||||||
t.replace(perform_katex_sub(inline_cache, display_cache, t.content))
|
t.replace(perform_katex_sub(inline_cache, display_cache, t.content))
|
||||||
end
|
end
|
||||||
File.write(file, document.to_html)
|
File.write(file, document.to_html)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user