Kill off unused anchors and unwanted small caps

parent 8eb04bd3
require("ccm_toolkit/filters-common")
-- Kill off archaic convestion of small caps for names and verse references
Span = function (element)
return (#element.classes == 1 and hasClass(element, { "sc" })) and element.content or element
end
......@@ -28,6 +28,9 @@ cleanup_gutenberg: $(filter en/%,$(MARKDOWNSOURCES))
$(call munge,$^,$(PERL) $(PERLARGS) -pne 's!\[\]\{#[^#]+?#Page_(\S+) \.x-ebookmaker-pageno\}![]{#page_\1 .print}!g',Fix Gutenberg ebook page number anchors)
.PHONY: cleanup_ccel
cleanup_ccel: private PANDOCFILTERS += --lua-filter=$(CCMTOOLKITDIR)/filter-clean_ccel.lua
cleanup_ccel: $(filter en/%,$(MARKDOWNSOURCES))
$(call munge,$^,$(PERL) $(PERLARGS) -pne 's!\[\]\{#[^#}]+#[^}]*?Page_([^\s}]+) \.pb\}![]{#page_\1 .print}!g',Fix CCEL ebook page number anchors)
$(call munge,$^,$(PERL) $(PERLARGS) -pne 's!\[(\[\]\{[^}]*\})!\1\[!g',Unwrap CCEL ebook page number anchors from other markup)
$(call munge,$^,$(PERL) $(PERLARGS) -pne 's!\[\]\{[^\s}]+?\}!!g',Drop unused anchor types)
$(call munge,$^,$(PANDOC) $(PANDOCARGS) $(PANDOCFILTERS) $(PANDOCFILTERARGS),Filter out unwanted styles)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment