flatnotes icon indicating copy to clipboard operation
flatnotes copied to clipboard

Allow Hyphens in Tags

Open philipp-koch opened this issue 1 year ago • 7 comments

Currently, underscores are the only allowed separator chars for tags, and hyphens are not allowed and thus prevent a hashtag to be recognized as such. For instance, #hello_world is recognized, can be searched for etc., while #hello-world doesn't work. Obsidian (which I've used for my markdown files) supports tags with hyphens, so my files have quite a bunch of hyphenated hashtags, and I guess, those of other users might as well.

philipp-koch avatar May 27 '23 00:05 philipp-koch

I'm not opposed to adding hyphens but it would require a change to the index which would mean a re-index of all notes upon update. So I'll leave this open as a suggestion and if it gets more votes, or I have to do another change to the index anyway, then I should be able to get this implemented.

dullage avatar May 27 '23 07:05 dullage

Another obsidian user here, +1 from me 😄

berot3 avatar Aug 09 '23 18:08 berot3

I’m not even aware of this tagging feature. How does it work? Thanks.

romu70 avatar Oct 07 '23 13:10 romu70

Take a look at the related wiki article. It should hopefully give you a good overview.

dullage avatar Oct 07 '23 14:10 dullage

Thanks. Just tested. Is there something I do wrong?

image

romu70 avatar Oct 07 '23 14:10 romu70

I've just re-read the wiki page and realised that whilst it explains how to tag a note, it doesn't explain what it does. I've added this section:

Tags are indexed separately from the rest of the content and so can be searched separately either by using the field prefix e.g. "tags:work" or using the hashtag shortcut e.g. "#work".

dullage avatar Oct 08 '23 06:10 dullage

Got it, thanks. It would be nice to :

  • Display tags as…tags in the notes
  • Displays tags in the notes list by default. We can imagine show them at the left of the timestamp. So everything will stay on the same line, as it is today.

romu70 avatar Oct 08 '23 07:10 romu70