From 8e79399f2cf87e6d8715b7daeb62ee39f3436a6b Mon Sep 17 00:00:00 2001
From: =?utf8?q?Paul=20H=C3=A4nsch?= (
ends section
+# - [ ]
terminates section
# - [x] Automatic heading identifiers (custom)
# - [x] Fenced code blocks (php md, pandoc)
# - [x] Fenced code attributes
@@ -741,10 +741,11 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code,
}
}
-function _list (block, mark, LOCAL, len, st, text, indent, task) {
+function _list (block, mark, p, LOCAL, len, st, text, indent, task) {
if ( match(block, "^([ \t]*\n)*$")) return;
match(block, "^" mark "[ \t]"); indent = RLENGTH;
sub("^" mark "[ \t]", "", block);
+ if (match(block, /\n[ \t]*\n/)) p = 1;
match( block, "\n" mark "[ \t][^\n]+(\n|$)" \
"(([ \t]*\n)* ? ? ?" mark "[ \t][^\n]+(\n|$)" \
@@ -763,10 +764,10 @@ function _list (block, mark, LOCAL, len, st, text, indent, task) {
sub(/^\[[-? /xX]\]/, "", text);
text = _nblock( text );
- if (match( text, "^
(
]|[^p]|<[^/]|[^<])*\n$" )) gsub( "(^|
\n$)", "", text); - return task text "\n" _list(block, mark); + return task text "\n" _list(block, mark, p); } function _dlist (block, LOCAL, len, st, text, indent, p) { -- 2.39.2