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

Supporting nested tags #571

Open daetanbhuck opened 2 months ago

daetanbhuck commented 2 months ago

Hello, I'm using nested tags and Obsidian_to_Anki only captures the first part of the tag. Would you please add nested tag support?

Desired behavior: Nested Obsidian tag becomes nested Anki tag. For example: #patent/21/10 becomes patent::21::10 in Anki.

The issue: #patent/21/10 becomes the tag patent and the "/21/10" is appended to the end of the card field.

Here are two examples:

  1. an apparatus described by function is anticipated or obvious when::the function of an apparatus is inherent in the prior art is #patent/21/14
  1. Q: a material or article worked upon by an apparatus A: does not impart patentability #patent/21/15
daetanbhuck commented 2 months ago

Also, using Anki-style tags in Obsidian has the same problem. The tag is patent and the "::21::14" is added to the card field.

envico801 commented 2 months ago

Hi, in #551 we were discussing a very similar problem, @panAtGitHub created a PR, #566 fixes this, it's all explained in the comments.