aboutsummaryrefslogtreecommitdiff
path: root/aux/emparse
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-29 20:09:20 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-29 20:09:20 +0000
commit4c238cc343935253c37c1da84d285b0adb21944a (patch)
treecdb3938a86dc48448f9a11384df52a9f122c3fa6 /aux/emparse
parentd72f8481386fa129152cf759eeb2075762053de6 (diff)
downloadem-4c238cc343935253c37c1da84d285b0adb21944a.tar.gz
Remove hyperlink reference list items from output
Diffstat (limited to 'aux/emparse')
-rwxr-xr-xaux/emparse9
1 files changed, 5 insertions, 4 deletions
diff --git a/aux/emparse b/aux/emparse
index d6073f3..f92e342 100755
--- a/aux/emparse
+++ b/aux/emparse
@@ -142,10 +142,11 @@ expectblock && /^===== .* =====$/ { heading(5, $0); next }
expectblock && /^====== .* ======$/ { heading(6, $0); next }
expectblock { newblock("p") }
-block = "ul" && /^ - / { item(1, "ul", line) }
-block = "ol" && /^ [0-9a-z]+\. / { item(1, "ol", line) }
-block = "nl" && /^ \[[0-9a-z]\]+ / { item(1, "nl", line) }
-block = "dl" && /^ .*: / { term(line) }
+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) }