`pandoc.read` has no HTML reader
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- backend-api-design
Línea de trabajo
Start by locating the Lua API implementation of pandoc.read and how it dispatches supported reader formats; the issue does not name source files or tests. Compare the existing Markdown readers with the expected HTML AST output and identify the project’s reader tests. Done means pandoc.read(text, "html") handles common HTML elements as described, or the Lua API documentation lists unsupported reader formats if HTML support is not planned.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
This issue was written by Claude while adding q2 support to Great Docs. The output shown comes from running each repro.
Bug description
In a Lua filter, pandoc.read(text, "html") raises "Unsupported reader format: html". q2's
readers are qmd, markdown, commonmark, json and raw-json. Under Quarto 1, filters commonly
use Pandoc's HTML reader to turn raw HTML into AST elements, for instance HTML returned by a
shortcode, or raw HTML blocks a filter wants to transform or convert to another format.
Great Docs writes a Markdown companion of every page, linked from the page as
<link rel="alternate" type="text/markdown">. Its markdown-pages filter reads each raw HTML block
and inline with pandoc.read(..., "html"), so that the content of shortcodes and generated HTML
appears in the Markdown. Under q2 those reads fail, and that content is left out of the companions.
Steps to reproduce
mkdir html-reader && cd html-reader
cat > read-html.lua <<'LUA'
function Pandoc(doc)
local ok, result = pcall(pandoc.read, "<p>Press <kbd>Ctrl</kbd> and <strong>save</strong>.</p>", "html")
if ok then
quarto.log.output(pandoc.write(result, "native"))
else
quarto.log.output("pandoc.read failed: " .. tostring(result))
end
end
LUA
printf -- '---\ntitle: Read HTML\nfilters:\n - read-html.lua\n---\n\nText.\n' > doc.qmd
q2 render doc.qmd
Actual behavior
pandoc.read failed: runtime error: Unsupported reader format: html. Supported formats: ["qmd", "markdown", "commonmark", "json", "raw-json"]
Expected behavior
As in Quarto 1.9.37:
[ Para
[ Str "Press"
, Space
, Span ( "" , [ "kbd" ] , [] ) [ Str "Ctrl" ]
, Space
, Str "and"
, Space
, Strong [ Str "save" ]
, Str "."
]
]
An HTML reader for pandoc.read, even one that covers only common elements (paragraphs, headings,
lists, tables, code, links, emphasis, and <span> and <div> with their attributes), would cover
most filter use. If it isn't planned, a list of the unsupported reader formats in the Lua API docs
would help extension authors.
- Lenguaje dominante
- Rust
- Estrellas
- 302
- Forks
- 22
- Merge medio
- 5 h 2 min
- PR fusionados (30 d)
- 213
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/q2
-
`dir: rtl` isn't written to `<html>` in HTML outputPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/q2#1219 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
quarto-dev/q2#1188 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
quarto-dev/q2#1179 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
quarto-dev/q2#1133 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
quarto-dev/q2#1103 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/q2
Issues similares
-
priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
storytold/photocraft#15350 ·
Los mantenedores suelen responder en 1 día
-
area:davinci
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ubugeeei-prod/vize#13167 ·
Los mantenedores suelen responder en 1 día
-
area:ui enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
transit-audio/transit#738 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 91/100
hocinehacherouf/liberarr#78 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día