From 8746de4a47d9b693b09ce166327051fd8aca01c2 Mon Sep 17 00:00:00 2001 From: Sebastien Benard Date: Tue, 23 Jul 2024 10:01:55 +0200 Subject: [PATCH] ADD displayTitle --- src/dn/Changelog.hx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/dn/Changelog.hx b/src/dn/Changelog.hx index 1507cdb..09203e3 100644 --- a/src/dn/Changelog.hx +++ b/src/dn/Changelog.hx @@ -95,9 +95,11 @@ class Changelog { throw 'Version number "$rawVersion" in changelog do not comply to SemVer semantics'; var ver = new Version(rawVersion); + var title = VERSION_TITLE_REG.matched(2)=="" ? null : VERSION_TITLE_REG.matched(2); cur = { version: ver, - title: VERSION_TITLE_REG.matched(2)=="" ? null : VERSION_TITLE_REG.matched(2), + title: title, + displayTitle: title==null ? ver.toString() : '${ver.toString()} - $title', allNoteLines: [], notEmptyNoteLines: [], } @@ -184,10 +186,16 @@ typedef ChangelogEntry = { var version : dn.Version; /** - Version title + Raw version title **/ var title: Null; + /** + If title is not null: "x.y.z" - "Title string" + Otherwise: "x.y.z" + **/ + var displayTitle: Null; + /** Markdown description lines **/