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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user