exercism / exercism/problem-specifications

markdown: add test for multiple lists

Ouverte
#1,664 8 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
hold
Langage dominant
Ruby
Étoiles
358
Forks
563
Merge moyen
18 h 41 min
PR mergées (30 j)
2

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.