# - [x] Automatic <section>-wrapping (custom)
# - ? Heading identifiers (php md, pandoc)
# - [x] Heading attributes (custom)
-# - [ ] <hr> ends section
+# - [ ] <hr> terminates section
# - [x] Automatic heading identifiers (custom)
# - [x] Fenced code blocks (php md, pandoc)
# - [x] Fenced code attributes
}
}
-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|$)" \
sub(/^\[[-? /xX]\]/, "", text);
text = _nblock( text );
- if (match( text, "^<p>(</p[^>]|</[^p]|<[^/]|[^<])*</p>\n$" ))
+ if ( ! p && match( text, "^<p>(</p[^>]|</[^p]|<[^/]|[^<])*</p>\n$" ))
gsub( "(^<p>|</p>\n$)", "", text);
- return task text "</li>\n" _list(block, mark);
+ return task text "</li>\n" _list(block, mark, p);
}
function _dlist (block, LOCAL, len, st, text, indent, p) {