From 80aac3ffed20cbb3514ac81ccacb91c14871ce01 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 21 Jul 2024 10:51:30 +0300 Subject: (single) Added line breaks and updated documentation with some non-standard features --- single.awk | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'single.awk') diff --git a/single.awk b/single.awk index 316981b..6d9e80e 100644 --- a/single.awk +++ b/single.awk @@ -3,7 +3,7 @@ # [x] Autoescape # [ ] Block elements # [x] Paragraph -# [ ] Line break +# [x] Line break # [.] Headers (atx and setex) # [x] Blockquotes # [ ] Lists @@ -17,6 +17,16 @@ # [ ] Other # [ ] Autolinks # [ ] Escapes +# +# [ ] Non-standard features +# [ ] Strikethrough ~~...~~ +# [ ] Superscript ^^...^^ +# [ ] Subscript ~...~ +# [ ] Footnote [^...] (with user customizations) +# [ ] Task list - [ ] +# [ ] Definition lists +# [ ] Fenced code blocks ```lang ``` +# [ ] Table alignment BEGIN { prev_blankline = blankline = 1 @@ -57,12 +67,17 @@ BEGIN { } # Horizontal rules -/^(-|\*|_) ?(-|\*|_) ?(-|\*|_)+$/ { +/^(-|\*|_) ?(-|\*|_) ?(-|\*|_|[[:blank:]])+$/ { print "
" blankline = 1 next } +# Line break +/ $/ { + sub(/ $/, "
") +} + # atx-style headers /^[[:blank:]]*#+/ { match($0, /#+/) -- cgit v1.3.1-23-gd82d