asciidoctor / asciidoctor-mathematical

An extension for Asciidoctor that converts the content of STEM blocks and inline macros using Mathematical.
MIT License
49 stars 44 forks source link

Most likely attributes redefined throughout the document are not visible to this extension #75

Open djencks opened 4 years ago

djencks commented 4 years ago

I'm not proficient enough in ruby to check this, but when imitating the algorithm here in javascript for https://gitlab.com/djencks/asciidoctor-mathjax.js, attributes not defined in the document header were not visible to the stem processing. Following a hint from Dan, I rewrote the search for stem content to visit the AST once, keeping track of the attribute values along the way. This produces the same behavior as the built-in stem processing. Adapting this to ruby should be easy for someone who can write this plugin :-)