aboutsummaryrefslogtreecommitdiff
path: root/emcollect
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-31 17:53:13 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-31 17:53:13 +0000
commit3ab42a5fb02a2652cae089bd3f936729fd49382d (patch)
tree3796f303e935ff9c532dba8467c174e418465b11 /emcollect
parent16685c2197586e8f1bd1168827f7b98c868bc1ac (diff)
downloadem-3ab42a5fb02a2652cae089bd3f936729fd49382d.tar.gz
Support [A-Za-z] in list item values
HTML/CSS makes this a bit awkward; all the better if em can handle it for you.
Diffstat (limited to 'emcollect')
-rwxr-xr-xemcollect6
1 files changed, 3 insertions, 3 deletions
diff --git a/emcollect b/emcollect
index c0f7759..de9c2d0 100755
--- a/emcollect
+++ b/emcollect
@@ -7,7 +7,7 @@ function collect(line) {
right = $0
sub("^ \\[", "", left)
sub("\\].*$", "", left)
- sub("^ \\[[0-9]+\\] <", "", right)
+ sub("^ \\[[0-9a-z]+\\] <", "", right)
sub(">$", "", right)
printf "%s=%s\n", left, right
}
@@ -15,5 +15,5 @@ function collect(line) {
BEGIN { expectblock = 1 }
/^$/ { expectblock = 1; getline }
-expectblock && /^ \[[0-9]+\] / { block = "nl"; expectblock = 0 }
-block = "nl" && /^ \[[0-9]+\] <(\.\/.*|\.\.\/.*|#.*|.*\/.*)>$/ { collect($0); next }
+expectblock && /^ \[[0-9a-z]+\] / { block = "nl"; expectblock = 0 }
+block = "nl" && /^ \[[0-9a-z]+\] <(\.\/.*|\.\.\/.*|#.*|.*\/.*)>$/ { collect($0); next }