katdown

Un traducteur md -> html minimal en awk - retour accueil

git clone git://bebou.netlib.re/katdown
Log | Files | Refs | README |

commit 359e67dfa09eaba3cd67ca5c7e4eecfb0b1a1b40
parent 78fff02c5f8334434a35f9dbd58f04c7c9c26f88
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Mon,  3 Mar 2025 17:00:43 +0100

Ajout du code inline avec la syntaxe ``

Diffstat:
Mkatdown | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/katdown b/katdown @@ -48,6 +48,10 @@ function render(line) { sub(/[*_]([^*_]+)[*_]/, sprintf("<em>%s</em>", substr(line, RSTART+1, RLENGTH-2)), line) } + while (match(line, /`([^`]+)`/)) { + sub(/`([^`]+)`/, sprintf("<code>%s</code>", substr(line, RSTART+1, RLENGTH-2)), line) + } + while (match(line, /\[.+\]\(.+\)/)) { inner = substr(line, RSTART+1, RLENGTH-2) split(inner, spl, /\]\(/)