Obsidian_to_Anki icon indicating copy to clipboard operation
Obsidian_to_Anki copied to clipboard

fix: correction of obsidian tags

Open envico801 opened this issue 11 months ago • 1 comments

Closes #551

Possible fix to the regex of OBS_TAG_REGEXP

With the new changes, it now detects chinese characters correctly.

envico801 avatar Mar 18 '24 15:03 envico801

An improved version of the regex could be this one:

const OBS_TAG_REGEXP = /#([\p{L}\p{N}\p{Emoji}\p{M}_/-]+)/gu;

Allowing to recognise characters from multiple languages and some others from the unicode family.

Detailed comment here

envico801 avatar Mar 19 '24 19:03 envico801