Dash-separated long list items rendered as sublist
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Empieza reproduciendo el problema con cmark 0.29.0 usando --to commonmark --width 80 y, después, vuelve a pasar la salida por cmark como se muestra en el informe. Traza cómo se trata el guion después de un enlace al ajustar el texto de los elementos de lista y verifica que el recorrido de ida y vuelta mantenga la descripción en el mismo elemento de lista en lugar de crear una sublista.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Here is a Markdown file with a list of very long items:
❯ cat ./dash-separated-link-list.md
- [Link 1](#link-1) - Description of line 1.
- [Link 2](#link-2) - A very long description for the second link in the list. That description is more than 80 characters wide.
- [This is a very long title, pointing to an awesome article on incredible stuff we're not used to see everyday](#link-3) - Line #3's description.
- [Link number three](#this-is-a-very-long-url-that-is-pointing-to-a-really-really-great-website) - Fourth description.
It cleanly renders into a list of 4 items:
❯ /System/Volumes/Data/usr/local/opt/cmark/bin/cmark ./dash-separated-link-list.md
<ul>
<li><a href="#link-1">Link 1</a> - Description of line 1.</li>
<li><a href="#link-2">Link 2</a> - A very long description for the second link in the list. That description is more than 80 characters wide.</li>
<li><a href="#link-3">This is a very long title, pointing to an awesome article on incredible stuff we're not used to see everyday</a> - Line #3's description.</li>
<li><a href="#this-is-a-very-long-url-that-is-pointing-to-a-really-really-great-website">Link number three</a> - Fourth description.</li>
</ul>
Now if I try to tidy up the original markdown into a 80-chars wide format, I get the following:
❯ /System/Volumes/Data/usr/local/opt/cmark/bin/cmark --to commonmark --width 80 ./dash-separated-link-list.md
- [Link 1](#link-1) - Description of line 1.
- [Link 2](#link-2) - A very long description for the second link in the list.
That description is more than 80 characters wide.
- [This is a very long title, pointing to an awesome article on incredible
stuff we're not used to see everyday](#link-3) - Line \#3's description.
- [Link number
three](#this-is-a-very-long-url-that-is-pointing-to-a-really-really-great-website)
- Fourth description.
Which renders into a list with an additional sub-list item:
❯ /System/Volumes/Data/usr/local/opt/cmark/bin/cmark --to commonmark --width 80 ./dash-separated-link-list.md | /System/Volumes/Data/usr/local/opt/cmark/bin/cmark
<ul>
<li><a href="#link-1">Link 1</a> - Description of line 1.</li>
<li><a href="#link-2">Link 2</a> - A very long description for the second link in the list.
That description is more than 80 characters wide.</li>
<li><a href="#link-3">This is a very long title, pointing to an awesome article on incredible
stuff we're not used to see everyday</a> - Line #3's description.</li>
<li><a href="#this-is-a-very-long-url-that-is-pointing-to-a-really-really-great-website">Link number
three</a>
<ul>
<li>Fourth description.</li>
</ul>
</li>
</ul>
This is due to an edge-case that is splitting an item content just before the dash located right after the link.
This bug has been reported first to the pandoc project at: https://github.com/jgm/pandoc/issues/6497 . An interesting thing here is that the previous implementation was supporting this edge case while the new one based on cmark does not.
For reference, here the version of cmark I'm using, installed with brew on macOS Catalina:
❯ brew install cmark
(...)
==> Downloading https://homebrew.bintray.com/bottles/cmark-0.29.0_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/3a/3af95418f96f4b0cec4bd76abaab312f3caf4cea591f38d3b725f15068d06491?__gda__=exp=1593691219~hmac=7f6c15036b995f36438e934f5bd44ec8
######################################################################## 100.0%
==> Pouring cmark-0.29.0_1.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/cmark/0.29.0_1: 17 files, 724.9KB
❯ /System/Volumes/Data/usr/local/opt/cmark/bin/cmark --version
cmark 0.29.0 - CommonMark converter
(C) 2014-2016 John MacFarlane
This bug can also be reproduced with the cmark-gfm formulae provided by brew:
❯ /System/Volumes/Data/usr/local/opt/cmark-gfm/bin/cmark-gfm --version
cmark-gfm 0.29.0.gfm.0 - CommonMark with GitHub Flavored Markdown converter
(C) 2014-2016 John MacFarlane
❯ /System/Volumes/Data/usr/local/opt/cmark-gfm/bin/cmark-gfm --to commonmark --width 80 ./dash-separated-link-list.md | /System/Volumes/Data/usr/local/opt/cmark-gfm/bin/cmark-gfm
<ul>
<li><a href="#link-1">Link 1</a> - Description of line 1.</li>
<li><a href="#link-2">Link 2</a> - A very long description for the second link in the list.
That description is more than 80 characters wide.</li>
<li><a href="#link-3">This is a very long title, pointing to an awesome article on incredible
stuff we're not used to see everyday</a> - Line #3's description.</li>
<li><a href="#this-is-a-very-long-url-that-is-pointing-to-a-really-really-great-website">Link number
three</a>
<ul>
<li>Fourth description.</li>
</ul>
</li>
</ul>
- Lenguaje dominante
- C
- Estrellas
- 2k
- Forks
- 702
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 7
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 commonmark/cmark
-
Incorrect `parser->offset` advancement for closing fenced code blocks in `parse_code_block_prefix`Posiblemente ocupada @cpruijsen la tomó hace 33 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
commonmark/cmark#590 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
API documentation is missing an explanation of CMARK_NODE_CUSTOM_BLOCK and CMARK_NODE_CUSTOM_INLINEAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
commonmark/cmark#441 · 2 comentarios ·
Los mantenedores suelen responder en 3 días
-
Inline code languageAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
commonmark/cmark#626 · 4 comentarios ·
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
commonmark/cmark#624 ·
Los mantenedores suelen responder en 3 días
-
Single-space blank line evicts a list-item continuationQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
commonmark/cmark#618 ·
Los mantenedores suelen responder en 3 días
Todos los issues de commonmark/cmark
Issues similares
-
Weekly fuzz run failedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kubernetes-sigs/security-profiles-operator#3597 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
AFLplusplus/AFLplusplus#2903 ·
-
Clean up stale and inaccurate comments in the platform screen and input filesPosiblemente ocupada @RichStephens la tomó hoy. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 88/100
FujiNetWIFI/fujinet-config#289 ·
Los mantenedores suelen responder en 1 día
-
[raylib] update to 6.2Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
nasa/cFS-GroundSystem#272 ·