From: Martin Pitt Date: Wed, 23 Sep 2026 21:19:12 +0000 (+0200) Subject: Accept short directive names X-Git-Url: https://piware.de/gitweb/?a=commitdiff_plain;h=6aa9b023d2a8bbffa05b5f66f89d74080e6e12e7;p=chordpro-web.git Accept short directive names Files in the wild use {t}, {st} and {c}; the latter made a song lose all its section comments. --- diff --git a/chordpro-web.js b/chordpro-web.js index cb5ea81..5f5ba2f 100644 --- a/chordpro-web.js +++ b/chordpro-web.js @@ -23,6 +23,10 @@ const directive_handlers = { }, comment: value => html`

${value}

`, }; +// short forms +directive_handlers.t = directive_handlers.title; +directive_handlers.st = directive_handlers.subtitle; +directive_handlers.c = directive_handlers.comment; function renderChordpro(text) { const song = [];