aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-01-31 14:26:56 +0000
committerJohn Ankarström <john@ankarstrom.se>2021-01-31 14:26:56 +0000
commit254097968bc13bfbadf18932f92ff275116ae95f (patch)
tree9ebd3cb35fb0fcfc93088c7457d34898a85acfee
parentc24ff6b3ff7abdfeff9fde7d19075ea1edec087c (diff)
downloadem-254097968bc13bfbadf18932f92ff275116ae95f.tar.gz
htindex: Support more characters
-rwxr-xr-xhtindex8
-rw-r--r--test.em2
-rw-r--r--test.html1
3 files changed, 9 insertions, 2 deletions
diff --git a/htindex b/htindex
index accd0be..b3f88f1 100755
--- a/htindex
+++ b/htindex
@@ -67,8 +67,12 @@ source $* | awk '
gsub("[ÙÚÛÜùúûü]", "u", s)
gsub("[×]", "x", s)
gsub("[Ýýÿ]", "y", s)
- gsub("[^-a-z_ ]", "", s)
- gsub("[ ]+", "-", s)
+ gsub("[/]", "-", s)
+ gsub("[ \n]+\\+[ \n]+", "+", s)
+ gsub("[ \n]+=[ \n]+", "=", s)
+ gsub("[ \n]+", "-", s)
+ gsub("[^=-+a-z0-9_ ]", "", s)
+ gsub("-+", "-", s)
return s
}
'
diff --git a/test.em b/test.em
index 95facea..0f44abb 100644
--- a/test.em
+++ b/test.em
@@ -36,5 +36,7 @@ ordered list item.
long term: long
definition
+=== 1 + 1 = 2 ===
+
code block
with two lines
diff --git a/test.html b/test.html
index 5a76eaf..089f1a6 100644
--- a/test.html
+++ b/test.html
@@ -57,6 +57,7 @@ ordered list item.
definition
</dd>
</dl>
+<h3 id="1+1=2">1 + 1 = 2</h3>
<pre>
code block
with two lines