Support unicode letter in the parser. Fix https://github.com/donetick/donetick/issues/395

This commit is contained in:
Mo Tarbin
2025-12-01 17:58:06 -05:00
parent 7cb2f203b1
commit 5bfd340176

View File

@@ -89,7 +89,8 @@ export const parseLabels = (inputSentence, userLabels) => {
const allHighlights = []
// Find all #label patterns in the sentence
const labelPattern = /#(\w+)/gi
// Use [\p{L}\p{N}_]+ to support Unicode letters (including umlauts) and numbers
const labelPattern = /#([\p{L}\p{N}_]+)/giu
const matches = [...inputSentence.matchAll(labelPattern)]
for (const match of matches) {