Skip to content

Commit

Permalink
ADD displayTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Jul 23, 2024
1 parent 4d5afbb commit 8746de4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/dn/Changelog.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
}
Expand Down Expand Up @@ -184,10 +186,16 @@ typedef ChangelogEntry = {
var version : dn.Version;

/**
Version title
Raw version title
**/
var title: Null<String>;

/**
If title is not null: "x.y.z" - "Title string"
Otherwise: "x.y.z"
**/
var displayTitle: Null<String>;

/**
Markdown description lines
**/
Expand Down

0 comments on commit 8746de4

Please sign in to comment.