summaryrefslogtreecommitdiff
path: root/ext/js/data/anki-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data/anki-util.js')
-rw-r--r--ext/js/data/anki-util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/data/anki-util.js b/ext/js/data/anki-util.js
index a063980f..c076c482 100644
--- a/ext/js/data/anki-util.js
+++ b/ext/js/data/anki-util.js
@@ -19,7 +19,7 @@
import {isObjectNotArray} from '../core/object-utilities.js';
/** @type {RegExp} @readonly */
-const markerPattern = /\{([\w-]+)\}/g;
+const markerPattern = /\{([\p{Letter}\p{Number}_-]+)\}/gu;
/**
* Gets the root deck name of a full deck name. If the deck is a root deck,
@@ -65,7 +65,7 @@ export function getFieldMarkers(string) {
* @returns {RegExp} A new `RegExp` instance.
*/
export function cloneFieldMarkerPattern(global) {
- return new RegExp(markerPattern.source, global ? 'g' : '');
+ return new RegExp(markerPattern.source, global ? 'gu' : 'u');
}
/**