Lua API to list the references of a document, like pandoc.utils.references
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start by reading crates/pampa/src/lua/utils.rs, where the issue says Lua utilities are registered, and trace how q2's citeproc reads document references. The goal is a Lua-accessible function returning those same references with at least their id; verify that a filter can distinguish reference IDs from other @ syntax. The issue does not name tests, so find the relevant Lua API or citation tests before implementing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Quarto 1 filters can call pandoc.utils.references(doc) to get the references that a document defines, from its references metadata and its bibliography files.
q2 resolves citations in its own citeproc, but no Lua function gives that list: pandoc.utils.references is nil in q2 0.48.0-nightly.20261126, and crates/pampa/src/lua/utils.rs does not register it.
Filters use this list to tell a real citation from other @ syntax.
For example, quarto-gitlink turns @user into a link to a GitHub profile, but leaves @key alone when key is a reference id.
Without the list, a filter cannot know which Cite elements q2 will resolve.
It has to keep every citation as is, or risk turning a reference into a user link.
function Pandoc(doc)
-- Quarto 1: a list of references with an `id` field.
-- q2: attempt to call a nil value (field 'references').
for _, ref in ipairs(pandoc.utils.references(doc)) do
quarto.log.output(ref.id)
end
end
It would help to have pandoc.utils.references, or a function in the quarto namespace, that returns the same references q2's citeproc reads, with at least their id.
Parsing the bibliography files from Lua is the only alternative, and that means support for BibTeX, CSL JSON and CSL YAML in each filter.
- Lingua principale
- Rust
- Stelle
- 316
- Fork
- 23
- Merge medio
- 11h 49m
- PR unite (30g)
- 245
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/q2
-
Heading anchor links have no icon: AnchorJS is initialised with an empty `icon`Forse già presa @cscheid l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/q2#1419 ·
I maintainer di solito rispondono entro 1 giorno
-
bug testing windows
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/q2#1346 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
quarto-dev/q2#1095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
quarto-dev/q2#1418 ·
I maintainer di solito rispondono entro 1 giorno
-
bug readers-writers windows
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
quarto-dev/q2#1416 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/q2
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 82/100
BurntSushi/jiff#755 ·
I maintainer di solito rispondono entro 1 giorno
-
After the kernel is given up on, a new import leaves "Importing…" and its Cancel on the status lineApertabug help wanted priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sawhorse3d/sawhorse#163 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
MartinPTielemans/ilo#4607 ·