Summary Files Commits Branches @commit @diff @stats
path: root / single.awk
diff options
context:
space:
mode:
Commit90b77f288c5f62b5119861976517910e2230ec00 (patch)
Author
 Syndamia <kamen@syndamia.com>
2024-07-21 14:58:12 +0300
Committer
 Syndamia <kamen@syndamia.com>
2024-07-21 14:58:12 +0300
Filesdc31bae09a669cfc239390027662a02cf7898db6 /single.awk
csg-90b77f288c5f62b5119861976517910e2230ec00.tar
csg-90b77f288c5f62b5119861976517910e2230ec00.tar.gz
csg-90b77f288c5f62b5119861976517910e2230ec00.zip
Parentf9994c7860b91d2efe26c075064de7e63a995059 (diff)
(simple) Implemented span code and some of the simpler non-standard features
1 files changed, 9 insertions, 4 deletions
-rw-r--r--single.awk13
diff --git a/single.awk b/single.awk
index 2908c32..1ceb577 100644
--- a/single.awk
+++ b/single.awk
@@ -14,16 +14,16 @@
# [x] Inline
# [ ] Reference
# [x] Emphasis
-# [ ] Code
+# [x] Code
# [ ] Images
# [ ] Other
# [ ] Autolinks
# [ ] Escapes
#
# [ ] Non-standard features
-# [ ] Strikethrough ~~...~~
-# [ ] Superscript ^^...^^
-# [ ] Subscript ~...~
+# [x] Strikethrough ~~...~~
+# [x] Superscript ^...^
+# [x] Subscript ~...~
# [ ] Footnote [^...] (with user customizations)
# [ ] Task list - [ ]
# [ ] Definition lists
@@ -187,6 +187,11 @@ function surround(brace, opening, closing) {
surround("_", "<em>", "</em>")
surround("\\*\\*", "<strong>", "</strong>")
surround("\\*", "<em>", "</em>")
+ surround("~~", "<s>", "</s>")
+ surround("~", "<sub>", "</sub>")
+ surround("\\^", "<sup>", "</sup>")
+ surround("``", "<code>", "</code>")
+ surround("`", "<code>", "</code>")
}
{ print }