return "<h" hlvl " id=\"" hid " - " HTML(htxt) "\">" inline( htxt ) "</h" hlvl ">\n\n" \
_block( substr( block, len + 1) );
+ # Split paragraphs
+ } else if ( match( block, /(^|\n)[[:space:]]*(\n|$)/) ) {
+ len = RLENGTH; st = RSTART;
+ return _block( substr(block, 1, st - 1) ) "\n" \
+ _block( substr(block, st + len) );
+
# Horizontal rule
} else if ( match( block, /(^|\n) ? ? ?((\* *){3,}|(- *){3,}|(_ *){3,})($|\n)/) ) {
len = RLENGTH; st = RSTART;
# Plain paragraph
} else {
- match( block, /(^|\n)[[:space:]]*(\n|$)/ ) || match( block, /$/ );
- len = RLENGTH; st = RSTART;
- return "<p>" inline( substr(block, 1, st - 1) ) "</p>\n" \
- _block( substr(block, st + len) );
+ return "<p>" inline(block) "</p>\n";
}
}