Browse Source

CustomFieldStringTemplate regular expressions, .{1,10} also possible

Martin Filser 3 năm trước cách đây
mục cha
commit
18d88035fb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      client/lib/customFields.js

+ 1 - 1
client/lib/customFields.js

@@ -15,7 +15,7 @@ export class CustomFieldStringTemplate extends CustomField {
     const ret = (rawValue ?? [])
       .filter(value => !!value.trim())
       .map(value => {
-        let _ret = this.format.replace(/[%$]\{.+?\}/g, function(_match) {
+        let _ret = this.format.replace(/[%$]\{.+?[^0-9]\}/g, function(_match) {
           let __ret;
           if (_match.match(/%\{value\}/i)) {
             __ret = value;