ObsidianToAnki / Obsidian_to_Anki

Script to add flashcards from text/markdown files to Anki
GNU General Public License v3.0
1.41k stars 125 forks source link

fix: correction of obsidian tags #552

Open envico801 opened 3 months ago

envico801 commented 3 months ago

Closes #551

Possible fix to the regex of OBS_TAG_REGEXP

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

envico801 commented 3 months ago

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