diff options
Diffstat (limited to 'aux')
-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) } |