diff options
1 files changed, 7 insertions, 1 deletions
| -rw-r--r-- | single.awk | 8 |
@@ -7,8 +7,8 @@ # [x] Headers (atx and setex) # [x] Blockquotes # [ ] Lists -# [ ] Horizontal rules # [x] Code blocks +# [x] Horizontal rules # [ ] Span elements # [ ] Links # [ ] Inline @@ -144,6 +144,12 @@ inside_codeblock && ! /^[ \t]*$/ { not_paragraph = 1 } +# Horizontal rule +/^(---+|- - -( -)*|\*\*\*+|\* \* \*( \*)*|___+|_ _ _( _)*)$/ { + $0 = "<hr/>" + not_paragraph = 1 +} + # Paragraph emptyP1 && !empty0 && !not_paragraph { $0 = "<p>" $0 } !emptyP1 && empty0 && !not_paragraph_p1 { P1 = P1 "</p>" } |
