summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois-Xavier Carton <fx.carton91@gmail.com>2020-10-01 18:52:43 +0200
committerFrançois-Xavier Carton <fx.carton91@gmail.com>2020-10-01 18:52:43 +0200
commit1390c5b4d16fd184f6bc42835919535d0e449a40 (patch)
tree47a5c42aa0385f726f268a8caec24441bee1521f
parentdf49a5e71445bd0840ea055583dc05a990b86157 (diff)
Add numbered lists
-rwxr-xr-xblog1
1 files changed, 1 insertions, 0 deletions
diff --git a/blog b/blog
index 4ab284f..bd7e71e 100755
--- a/blog
+++ b/blog
@@ -91,6 +91,7 @@ blog/%.html: articles/% $(addprefix templates/,$(addsuffix .html,header article_
-e 's,\[\([^]]*\)\](\([^)]*\)),<a href="\2">\1</a>,g' \
-e 's,`\([^`]*\)`,<q>\1</q>,g' \
-e '/^- /{s,^- ,<li>,;s,$$,</li>,;x;/^<\/ul>/{x;bL};p;s,.*,<ul>,;bT}' \
+ -e '/^[1-9][0-9]*\. /{s,^[0-9]*\. ,<li>,;s,$$,</li>,;x;/^<\/ol>/{x;bL};p;s,.*,<ol>,;bT}' \
-e '/^$$/{x;/^$$/d;p;d}' \
-e 'x;/^$$/{s,.*,<p>,;bT};x' \
-e ':L;$$G;p;d' \