diff options
author | John Ankarström <john@ankarstrom.se> | 2021-01-29 21:18:07 +0000 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-01-29 21:18:07 +0000 |
commit | a9b6311209593b5a5955048e124fc45a9d4a108e (patch) | |
tree | 7b9c7bceb311b0b53b211eda2218565f2a21420d /aux/emparse | |
parent | a27e58ed6acc8e9719bd8ed7c226d2734ff7a654 (diff) | |
download | em-a9b6311209593b5a5955048e124fc45a9d4a108e.tar.gz |
Fix lists
Apparently I removed "open" from every "openblock"? How?
Diffstat (limited to 'aux/emparse')
-rwxr-xr-x | aux/emparse | 38 |
1 files changed, 19 insertions, 19 deletions
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) } |