How do you manage to make different custom Lua filters parse the syntaxes at the same time when they are nested in other unofficial syntaxes, similar to PyMdown and markdown-it?
#11284
Replies: 3 comments 4 replies
-
|
I don't understand the problem. I don't know how render-content-tabs-mkdocs.lua modifies the AST, but if you apply render-icons.lua and render-keys.lua before render-content-tabs-mkdocs.lua, Pandoc will parse ++ctrl+alt+del++ and 😄 as regular Str objects and your filters will be able to replace the content of these Str with whatever you want.
|
Beta Was this translation helpful? Give feedback.
-
|
After having performed several tests regarding @tarleb’s For the purposes of my project which is written in Go and relies on Pandoc, I have determined that both Reasons
|
Beta Was this translation helpful? Give feedback.
-
|
I'm using panluna in production, installed via luarocks. So it's definitely possible to install it that way. Check if your luarocks installation uses Lua 5.4, and adjust via |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Picture yourself creating three different Lua filters to find, parse and process:
render-icons.luarender-keys.luarender-content-tabs-mkdocs.luaAnd the codes in Markdown:
These filters can find them and parse them, as they are not nested in other syntaxes.
But if I nest the syntaxes in other syntaxes:
These filters —
render-iconsandrender-keys— can not find these syntaxes because they are nested in another syntax that was found and parsed byrender-content-tabs-mkdocsfilter.The @facelessuser and the contributors are incredibly excellent at managing several Markdown extensions, written in Python, handling the nest support very well, but I do not want to use Python or MkDocs or Google’s material design. I want to use Pandoc and to have own HTML and CSS, hence I had to build several Lua filters inspired by @facelessuser’s, @squidfunk’s and other non-Lua Markdown extensions as well as Codebraid and Quarto. I built a content tabs group filter, it parsed correctly the content tab groups, supporting the text formatting in both tab title and content, both under fenced contained blocks and at the top-level, both under the disabled and enabled
smartextension, but it prevented other filters from parsing other syntaxes as key syntax in the tab title and in the content.I understood that PyMdown is very similar to
markdown-it, what allows us to add many new extensions.I do not know if Pandoc has this similar design and can handle the nest when the unofficial syntaxes are nested in other unofficial syntaxes.
I have read the discussion #11142 and @fiapps indicated panluna, but I am not certain if
panlunacan handle my filters when the unofficial syntaxes are nested in unofficial syntaxes. Perhaps @tarleb may know answering it.Beta Was this translation helpful? Give feedback.
All reactions