From e766158d2d59ab60c388a0f20e96f0a6649c4935 Mon Sep 17 00:00:00 2001 From: Cimbali Date: Thu, 27 May 2021 12:36:55 +0200 Subject: [PATCH] Remove unused nodes in LaTeX sources --- lib/docs/filters/latex/clean_html.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/docs/filters/latex/clean_html.rb b/lib/docs/filters/latex/clean_html.rb index 5902679f..98d198ce 100644 --- a/lib/docs/filters/latex/clean_html.rb +++ b/lib/docs/filters/latex/clean_html.rb @@ -13,6 +13,10 @@ module Docs css('h1, h2, h3, h4').each { |node| node.content = node.content.sub /^[0-9A-Z]+(\.[0-9]+)* /, '' } + css('div.example').each do |node| + node.replace(node.children) + end + css('pre').each do |node| node.delete 'class' node['data-language'] = 'latex'