pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

mhchem Math function does not update AST #276

Closed mcclurgm closed 4 months ago

mcclurgm commented 4 months ago

In the mhchem filter, Math elements are not updated. I think this is because the Math function does not return a value. See: https://github.com/pandoc/lua-filters/blob/2aa98bfda556c7d4dfb8e30c20b318b6fd1f5091/mhchem/mhchem.lua#L205-L207

I think that just returning el will solve this issue.

jgm commented 4 months ago

Thanks. Let me know if that doesn't fix it!