aboutsummaryrefslogtreecommitdiff
path: root/emparse
diff options
context:
space:
mode:
Diffstat (limited to 'emparse')
-rwxr-xr-xemparse8
1 files changed, 4 insertions, 4 deletions
diff --git a/emparse b/emparse
index 7423bb2..3985a86 100755
--- a/emparse
+++ b/emparse
@@ -27,7 +27,7 @@ openblock == "pre" { sub("^ ", ""); $0 = escape($0); printf "%s\n", $0; next }
openblock == "blockquote" && /^ > / { item(1, "blockquote", line) }
openblock == "ul" && /^ - / { item(1, "ul", line) }
openblock == "ol" && /^ [0-9]+\. / { item(1, "ol", line) }
-openblock == "nl" && /^ \[[0-9]+\] / { item(1, "nl", line) } # text reference
+openblock == "nl" && /^ \[[0-9]+\] / { item(1, "nl", line) }
openblock == "dl" && /^ .*: / { term(line) }
(openblock == "ul" || openblock == "ol") && /^ -/ { item(2, "ul", line) }
@@ -49,11 +49,11 @@ function format(line) {
for (i = 0; i <= n; i++) {
if (w[i] == "") continue;
- if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|.*/.*)&gt;$"))
+ if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|#.*|.*/.*)&gt;$"))
w[i] = link(substr(w[i], 5, RLENGTH-8))
- else if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|.*/.*)&gt;[.,:;?!)]$"))
+ else if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|#.*|.*/.*)&gt;[.,:;?!)]$"))
w[i] = link(substr(w[i], 5, RLENGTH-9)) substr(w[i], RLENGTH)
- else if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|.*/.*)&gt;\\)[.,:;?!]$"))
+ else if (match(w[i], "^&lt;(\\./.*|\\.\\./.*|#.*|.*/.*)&gt;\\)[.,:;?!]$"))
w[i] = link(substr(w[i], 5, RLENGTH-10)) substr(w[i], RLENGTH-1)
if (match(w[i], "^\\[[0-9]+\\]$"))