diff options
| Commit | 622d898e1637d01e14c2e92b913214857c00f901 (patch) | |
|---|---|---|
| Author | 2024-12-31 15:36:43 +0200 | |
| Committer | 2024-12-31 15:36:43 +0200 | |
| Files | 7312c0751bf993d169413f488f201d13c407f87a /single.awk | |
| csg-622d898e1637d01e14c2e92b913214857c00f901.tar csg-622d898e1637d01e14c2e92b913214857c00f901.tar.gz csg-622d898e1637d01e14c2e92b913214857c00f901.zip | ||
| Parent | a37918bea9ffae7ee8ede84eb4ce6deb5709b631 (diff) | |
feat(single): Implement horizontal rules
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>" } |
