diff options
author | davidovski <david@davidovski.xyz> | 2023-02-18 01:29:59 +0000 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2023-02-18 01:29:59 +0000 |
commit | 7bcc93b621c4886f5a5f5aa72b22fe423cd3a777 (patch) | |
tree | 47dfe5948ae1f4c66c8b89032d45ad8172e3fdf6 /src | |
parent | e8e91a50251993f40c1beb3db1eb5546958242b7 (diff) |
Reformat code and add todo functions
Diffstat (limited to 'src')
-rwxr-xr-x | src/md2html.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/md2html.sh b/src/md2html.sh index 1c06e2d..7387fb2 100755 --- a/src/md2html.sh +++ b/src/md2html.sh @@ -56,6 +56,7 @@ _emph () { # parse heading # # h [heading no.] +# _h () { local num=$1 while IFS= read -r line; do @@ -80,12 +81,11 @@ _h () { # parse paragraphs # -# p _p () { empty=true while IFS= read -r line; do case "$line" in - "#"*) + "#"*|">"*|"``"*) printf "%s\n" "$line" ;; "") @@ -108,6 +108,11 @@ _p () { } } +# parse ref-style links +# +_ref () { +} + # parse links # _a_img () { @@ -149,6 +154,15 @@ _ul () { _ol () { } +# parse mutliline codeblocks +# +_code () { +} + +# parse quotes +# +_quote () { +} # convert the markdown from stdin into html |