1.18.1 - fix description pattern in title (#3179)
* bump version * add comment to customer/project/activity entity and collections api * improve title pattern usage
This commit is contained in:
@@ -224,15 +224,17 @@ export default class KimaiFormSelect extends KimaiPlugin {
|
||||
title = title.replace(new RegExp('{' + field + '}', 'g'), value ?? '');
|
||||
}
|
||||
title = title.replace(/- \?-\?/, '');
|
||||
title = title.replace(/\r\n|\r|\n/g, ' ');
|
||||
title = title.substr(0, 110);
|
||||
|
||||
const chars = '- ';
|
||||
let start = 0, end = title.length;
|
||||
|
||||
while(start < end && chars.indexOf(title[start]) >= 0) {
|
||||
while (start < end && chars.indexOf(title[start]) >= 0) {
|
||||
++start;
|
||||
}
|
||||
|
||||
while(end > start && chars.indexOf(title[end - 1]) >= 0) {
|
||||
while (end > start && chars.indexOf(title[end - 1]) >= 0) {
|
||||
--end;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user