From a9b6311209593b5a5955048e124fc45a9d4a108e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Fri, 29 Jan 2021 21:18:07 +0000 Subject: Fix lists Apparently I removed "open" from every "openblock"? How? --- aux/emparse | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'aux') diff --git a/aux/emparse b/aux/emparse index 38bec54..73fdd5c 100755 --- a/aux/emparse +++ b/aux/emparse @@ -158,7 +158,7 @@ END { breakblock() } /^$/ { breakblock(); getline } expectblock && /^ / { newblock("table") } expectblock && /^ - / { newblock("ul") } -expectblock && /^ [0-9a-z]+\. / { newblock("ol") } +expectblock && /^ [0-9a-z]+\. / { newblock("ol") } expectblock && /^ \[[0-9a-z]\]+ / { newblock("nl") } expectblock && /^ .*: / { newblock("dl") } expectblock && /^ / { newblock("pre") } @@ -171,23 +171,23 @@ expectblock && /^===== .* =====$/ { heading(5, $0); next } expectblock && /^====== .* ======$/ { heading(6, $0); next } expectblock { newblock("p") } -block = "pre" { sub("^ ", ""); escape(); printf "%s\n", $0; next } - -block = "ul" && /^ - / { item(1, "ul", line) } -block = "ol" && /^ [0-9a-z]+\. / { item(1, "ol", line) } -block = "nl" && /^ \[[0-9a-z]\]+ [^ ]+$/ { next } # hyperlink reference -block = "nl" && /^ \[[0-9a-z]\]+ / { item(1, "nl", line) } # text reference -block = "dl" && /^ .*: / { term(line) } - -block = "ul" && /^ -/ { item(2, "ul", line) } -block = "ol" && /^ [0-9a-z]+\./ { item(2, "ol", line) } -block = "ul" && /^ -/ { item(3, "ul", line) } -block = "ol" && /^ [0-9a-z]+\./ { item(3, "ol", line) } -block = "ul" && /^ -/ { item(4, "ul", line) } -block = "ol" && /^ [0-9a-z]+\./ { item(4, "ol", line) } -block = "ul" && /^ -/ { item(5, "ul", line) } -block = "ol" && /^ [0-9a-z]+\./ { item(5, "ol", line) } -block = "ul" && /^ -/ { item(6, "ul", line) } -block = "ol" && /^ [0-9a-z]+\./ { item(6, "ol", line) } +openblock == "pre" { sub("^ ", ""); escape(); printf "%s\n", $0; next } + +openblock == "ul" && /^ - / { item(1, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\. / { item(1, "ol", line) } +openblock == "nl" && /^ \[[0-9a-z]\]+ [^ ]+$/ { next } # hyperlink reference +openblock == "nl" && /^ \[[0-9a-z]\]+ / { item(1, "nl", line) } # text reference +openblock == "dl" && /^ .*: / { term(line) } + +openblock == "ul" && /^ -/ { item(2, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\./ { item(2, "ol", line) } +openblock == "ul" && /^ -/ { item(3, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\./ { item(3, "ol", line) } +openblock == "ul" && /^ -/ { item(4, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\./ { item(4, "ol", line) } +openblock == "ul" && /^ -/ { item(5, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\./ { item(5, "ol", line) } +openblock == "ul" && /^ -/ { item(6, "ul", line) } +openblock == "ol" && /^ [0-9a-z]+\./ { item(6, "ol", line) } { format($0) } -- cgit v1.2.3