Skip to content

Lua - new API quarto.format.format_identifier() #13112

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cscheid
Copy link
Collaborator

@cscheid cscheid commented Jul 21, 2025

Minimal self-test:

format-identifier.qmd

---
format: html+test
filters:
  - format-identifier.lua
---

format-identifier.lua

function Pandoc(doc)
  local identifier = quarto.format.format_identifier()
  assert(identifier["target-format"] == "html+test")
  assert(identifier["base-format"] == "html")
  assert(identifier["display-name"] == "HTML")
  return doc
end

.format_identifier()
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jul 21, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@cderv
Copy link
Collaborator

cderv commented Jul 22, 2025

So if we expose this directly to LUA, I would vote for exposing exactly the same to engine
Which was exactly your idea in #2216

So we could do both for 1.8: Expose FormatIdentifier to engines and Lua process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants