]> git.plutz.net Git - shellwiki/blob - parsers/50_markdown.sh
Merge commit '1b5b1676f9f6869aec5cd141a9670e12ccd28b5d'
[shellwiki] / parsers / 50_markdown.sh
1 #!/bin/sh
2
3 if which awk >/dev/null; then
4   awk -f "$_EXEC/md_macros.awk" -f "$_EXEC/cgilite/markdown.awk"
5   # | sed -E 's;(<[^>]+ )href="((/[^"/]+|[^"/]+[^:/]|)/([^"/]+/)*)"([^>]*>);\1href="\2:'"${LANGUAGE}"'"\5;g'
6 elif which busybox >/dev/null; then
7   busybox awk -f "$_EXEC/md_macros.awk" -f "$_EXEC/cgilite/markdown.awk"
8   # | sed -E 's;(<[^>]+ )href="((/[^"/]+|[^"/]+[^:/]|)/([^"/]+/)*)"([^>]*>);\1href="\2:'"${LANGUAGE}"'"\5;g'
9 else
10   cat
11 fi