Extra leading spaces when wrapping list to fixed width
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Reproduce la salida del ajuste de línea de listas con el punto de entrada de línea de comandos cmark y el ancho indicado de 80. Inspecciona el renderizado y el ajuste de línea de las listas, y añade o actualiza la cobertura para el ejemplo; estará terminado cuando los elementos de lista ajustados no obtengan los dos espacios iniciales adicionales, mientras que las líneas de continuación sigan teniendo la indentación correcta.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Here is a simple Markdown list:
❯ cat ./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.
Re-wrapping this to a maximum length of 80 characters introduces 2 spaces before each lines:
❯ /System/Volumes/Data/usr/local/opt/cmark/bin/cmark --to commonmark --width 80 ./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.
Here I expect cmark to get rid of these leading spaces and render as such:
- [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.
Why? So we can fix a regression in pandoc. See how the previous flavor (markdown_github) behaved in that situation compared to the new one (gfm, based on cmark):
❯ pandoc --version
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.1, skylighting 0.8.3.2
❯ pandoc ./list.md --to=markdown_github
[WARNING] Deprecated: markdown_github. Use gfm instead.
- [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.
❯ pandoc ./list.md --to=gfm
- [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.
I guess this behaviour should be somewhat configurable in cmark as pandoc does with the --tab-stop parameter:
❯ pandoc ./list.md --to=markdown_github --tab-stop=2
[WARNING] Deprecated: markdown_github. Use gfm instead.
- [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.
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
- Lenguaje dominante
- C
- Estrellas
- 2k
- Forks
- 698
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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 23 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
commonmark/cmark#590 · 3 comentarios ·
-
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 ·
-
Inline code languageAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
commonmark/cmark#626 · 4 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
commonmark/cmark#624 ·
-
Single-space blank line evicts a list-item continuationPosiblemente ocupada @afonsojanu la tomó hace 33 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
commonmark/cmark#618 ·
Todos los issues de commonmark/cmark
Issues similares
-
Linux notifications: the default action's ' ' label shows as a blank button in xfce4-notifydAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kovidgoyal/kitty#10625 ·
Los mantenedores suelen responder en 1 día
-
Feature Status: Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
RubyMetric/chsrc#396 ·