1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-03 09:02:59 +00:00

Add startCount to unusedtitle macro, new tests, new docs (#7941)

* add startCount to unusedtitle macro, new tests, new docs

* rename test files

* update .from-version in docs
This commit is contained in:
Mario Pietsch
2024-09-10 11:49:41 +02:00
committed by GitHub
parent b12625c9f6
commit 8a8dcf8255
9 changed files with 81 additions and 18 deletions

View File

@@ -330,16 +330,18 @@ exports.formatTitleString = function(template,options) {
}]
];
while(t.length){
var matchString = "";
var matchString = "",
found = false;
$tw.utils.each(matches, function(m) {
var match = m[0].exec(t);
if(match) {
found = true;
matchString = m[1].call(null,match);
t = t.substr(match[0].length);
return false;
}
});
if(matchString) {
if(found) {
result += matchString;
} else {
result += t.charAt(0);