From 6aa9b023d2a8bbffa05b5f66f89d74080e6e12e7 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 23 Sep 2026 23:19:12 +0200 Subject: [PATCH] Accept short directive names Files in the wild use {t}, {st} and {c}; the latter made a song lose all its section comments. --- chordpro-web.js | 4 ++++ 1 file changed, 4 insertions(+) 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 = []; -- 2.47.3