-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out shortcodes as pandoc-filter #904
Comments
Yes, it would be good to have this work in a uniform fashion. I've put up a PR to lua-filters here: pandoc/lua-filters#231 Note that I did need to extract a fair number of helper functions from Quarto's Lua code to make this standalone so it's not super-straightforward to literally share the code going forward. That said, I will track changes in both places and make sure that things stay more or less in sync. |
Great, thanks a lot! I guess |
That's right, |
It turns out that there is some ongoing discussion about what should be included in the |
Quarto shortcodes are a powerful, yet non-standard, extension to pandoc markdown syntax. Having them separated as reusabe lua filter, located at https://github.com/pandoc/lua-filters or in a separate git repository would allow to use this feature independently from Quarto and help to agree on common markdown extensions instead of every tool having its own extensions. The current implementation is somwhere in the Quarto sources. I managed to use it with a Quarto installation this way:
result:
This use is obviously fragile. I would welcome an official release of shortcodes as lua filter. I guess that it's enough to combine
shortcodes.lua
andshortcodes-handlers.lua
and to provide an alternative to lua function call param to get the the list of custom shortcode files (could be a document meta variable or an environment variable such asFILTER_SHORTCODES
). Sure I could just copy and adjust the code and add it to lua-filters but then shortcodes feature is forked and with further evolution of Quarto we likely have two slightly differing sets and types of shortcodes.tl;dr: it makes sense to reuse shortcodes independently from Quarto but this should be made easy and stable.
The text was updated successfully, but these errors were encountered: