diff options
1 files changed, 10 insertions, 1 deletions
| -rw-r--r-- | single.awk | 11 |
@@ -50,6 +50,12 @@ function empty(value) { return value == "" } +function _next() { + __buffered_print() + not_paragraph = 1 + next +} + { not_paragraph_p1 = not_paragraph not_paragraph = 0 @@ -65,7 +71,7 @@ function empty(value) { # Inline HTML /^[ \t]*<\/?[0-9A-Za-z]+/ { - not_paragraph = 1 + _next() } # Blockquotes @@ -125,6 +131,9 @@ emptyP1 && !empty0 && !not_paragraph { $0 = "<p>" $0 } # After all $0 parsing { + __buffered_print() +} +function __buffered_print() { empty0 = empty($0) emptyP1 = empty(P1) |
