From c85b6408a067ced3ee4c047668d965f7ae64374c Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 21 Jul 2024 15:30:25 +0300 Subject: (single) Implemented single-line definition lists --- single.awk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'single.awk') diff --git a/single.awk b/single.awk index 46ff93d..82555f6 100644 --- a/single.awk +++ b/single.awk @@ -26,7 +26,9 @@ # [x] Subscript ~...~ # [ ] Footnote [^...] (with user customizations) # [ ] Task list - [ ] -# [ ] Definition lists +# [.] Definition lists +# [x] Single line +# [ ] Multi-line # [ ] Fenced code blocks ```lang ``` # [ ] Table alignment @@ -212,6 +214,15 @@ function surround(brace, opening, closing) { } +!prev_blankline && /^: / { + sub(/^

/, "", prev) + sub(/^: /, "") + print "

" prev "
" ORS "
" $0 "
" + skipprint = 1 + blankline = 1 + next +} + { println() } -- cgit v1.3.1-23-gd82d