Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit784f8c91c436d4f90d3af12e2790e60ef082601c (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-01-01 11:40:43 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-01-01 11:40:43 +0200
Files0253e72883f3964d60c516b4d66134072157c806
csg-784f8c91c436d4f90d3af12e2790e60ef082601c.tar
csg-784f8c91c436d4f90d3af12e2790e60ef082601c.tar.gz
csg-784f8c91c436d4f90d3af12e2790e60ef082601c.zip
Parentd347c2ee4c941419cf75d252cf04fcbda2c6286a (diff)
feat(single): Support for strikethrough, superscript and subscript
1 files changed, 9 insertions, 5 deletions
-rw-r--r--single.awk14
diff --git a/single.awk b/single.awk
index 7698bca..0481a49 100644
--- a/single.awk
+++ b/single.awk
@@ -6,14 +6,14 @@
# identation with which the list beginning (e.g. "* " or "5. ") was written.
# The benefit is that all Markdown is parsed as normal inside an item.
#
-# [ ] Non-standard features
-# [ ] Strikethrough ~~...~~
-# [ ] Superscript ^...^
-# [ ] Subscript ~...~
+# [.] Non-standard features
+# [x] Strikethrough ~~...~~
+# [x] Superscript ^...^
+# [x] Subscript ~...~
# [ ] Footnote [^...] (with user customizations)
# [ ] Task list - [ ] (readonly)
# [ ] Definition lists
-# [x] Single line
+# [ ] Single line
# [ ] Multi-line
# [ ] Fenced code blocks ```lang ```
# [ ] Tables
@@ -340,6 +340,10 @@ function gsurround(brace, left, right, blen) {
gsurround("\\*" , "<em>" , "</em>", 1)
gsurround("``" , "<code>" , "</code>")
gsurround("`" , "<code>" , "</code>")
+
+ gsurround("~~" , "<s>" , "</s>")
+ gsurround("~" , "<sub>" , "</sub>")
+ gsurround("\\^", "<sup>" , "</sup>", 1)
}
# Links