diff options
| Commit | b9c9916c071be1bdd5d855f652c6bc46c972a936 (patch) | |
|---|---|---|
| Author | 2025-07-19 09:24:05 +0300 | |
| Committer | 2025-07-19 09:24:05 +0300 | |
| Files | 0c27c3b74e72c41f7c7368693bd71c90db77d869 | |
| syndamia.com-b9c9916c071be1bdd5d855f652c6bc46c972a936.tar syndamia.com-b9c9916c071be1bdd5d855f652c6bc46c972a936.tar.gz syndamia.com-b9c9916c071be1bdd5d855f652c6bc46c972a936.zip | ||
| Parent | 26399584792adef3896c92025353ec482cfa2d3d (diff) | |
feat: Add basic Markdown to dunbar convertion script
This marks the start of the dunbar rewrite
1 files changed, 22 insertions, 0 deletions
| -rwxr-xr-x | md-to-du.sed | 22 |
diff --git a/md-to-du.sed b/md-to-du.sed new file mode 100755 index 0000000..2b315e2 --- /dev/null +++ b/md-to-du.sed @@ -0,0 +1,22 @@ +#!/usr/bin/env -S sed -rf + +#== Inline elements ==# + +# <br> -> \n +s/<br>/\\n/g + +# `...` -> `[...]` +s/`([^`]+)`/`[\1]`/g +# **...** -> =[...]= +s/\*\*([^*]+)\*\*/=[\1]=/g +# *...* -> *[...]* +s/\*([^*]+)\*/*[\1]*/g + +# [TITLE](URL) -> [url URL TITLE] +s/\[([^]]*)\]\(([^)]*)\)/[url \2 \1]/g + +#== syndamia.com specifics ==# + +#-- MEL --# +# &.x -> [$x] +s/&\.([a-z]+)/[$\1]/g |