@mostajs/markdown-html 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mostajs/markdown-html",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Rendu Markdown → HTML zéro dépendance, sans build : titres, listes, tableaux, code, citations, liens, cases à cocher + table des matières. Tout est échappé (le HTML d'un .md n'est PAS interprété). Pour servir un README comme page d'aide.",
|
|
5
5
|
"author": "Dr Hamid MADANI <drmdh@msn.com>",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
package/src/index.js
CHANGED
|
@@ -105,8 +105,10 @@ export function mdToHtml(md = '') {
|
|
|
105
105
|
continue;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// Ligne vide → ferme
|
|
109
|
-
|
|
108
|
+
// Ligne vide → NE ferme PAS la liste (listes « lâches » : items séparés par une ligne vide =
|
|
109
|
+
// une seule liste, numérotation continue). La liste est fermée par le prochain bloc non-liste
|
|
110
|
+
// (titre, paragraphe, citation, tableau, code, hr) qui appelle closeList, ou en fin de document.
|
|
111
|
+
if (!line.trim()) { i++; continue; }
|
|
110
112
|
|
|
111
113
|
// Paragraphe (les lignes suivantes sont recollées)
|
|
112
114
|
closeList(state);
|