Class: Asciidoctor::MathJax3::Postprocessor
- Inherits:
-
Extensions::Postprocessor
- Object
- Extensions::Postprocessor
- Asciidoctor::MathJax3::Postprocessor
- Defined in:
- lib/asciidoctor/mathjax3/postprocessor.rb
Instance Method Summary collapse
Instance Method Details
#process(document, output) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/asciidoctor/mathjax3/postprocessor.rb', line 6 def process document, output cfg = %r{<script type="text/x-mathjax-config">.*?</script>}m m2 = %r{<script src=".*?TeX-MML-AM_HTMLorMML"></script>} m3 = %(<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>) output.sub(cfg, '').sub(m2, m3) end |