exercism / exercism/problem-specifications

markdown: add test for multiple lists

Abierto
#1,664 8 comentarios 1 reacción 0 asignados Ver en GitHub
hold
Lenguaje dominante
Ruby
Estrellas
358
Forks
563
Merge medio
18 h 41 min
PR fusionados (30 d)
2

Descripción

I was just going to suggest adding an additional test to ensure that the code handles multiple lists properly. In my solution to the problem, I used a regex to insert the `

    ` tags at the appropriate locations. Originally I had just `(
  • .*
  • )` which passed all the tests, but which will work ONLY WHEN YOU HAVE A SINGLE LIST in your markdown text. If you have more than one, it'll put a single pair of `
      ` tags around all of them (beginning of the first, end of the last) and whatever headers and paragraphs are found between.

      My current regex `(

    • .*?
    • )(<[ph])|(
    • .*
    • )` handles multiple lists correctly, as far as I can tell. The first half (before the '|') catches string-initial or internal lists, while the latter half will kick in to handle string-terminal lists.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.