File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2525from  ..models  import  Note , NoteCreate , NoteUpdate , SearchResult 
2626
2727MARKDOWN_EXT  =  ".md" 
28- INDEX_SCHEMA_VERSION  =  "4 " 
28+ INDEX_SCHEMA_VERSION  =  "5 " 
2929
3030StemmingFoldingAnalyzer  =  StemmingAnalyzer () |  CharsetFilter (accent_map )
3131
@@ -41,9 +41,11 @@ class IndexSchema(SchemaClass):
4141
4242
4343class  FileSystemNotes (BaseNotes ):
44-  TAGS_RE  =  re .compile (r"(?:(?<=^#)|(?<=\s#))\w +(?=\s|$)" )
44+  TAGS_RE  =  re .compile (r"(?:(?<=^#)|(?<=\s#))[a-zA-Z0-9_-] +(?=\s|$)" )
4545 CODEBLOCK_RE  =  re .compile (r"`{1,3}.*?`{1,3}" , re .DOTALL )
46-  TAGS_WITH_HASH_RE  =  re .compile (r"(?:(?<=^)|(?<=\s))#\w+(?=\s|$)" )
46+  TAGS_WITH_HASH_RE  =  re .compile (
47+  r"(?:(?<=^)|(?<=\s))#[a-zA-Z0-9_-]+(?=\s|$)" 
48+  )
4749
4850 def  __init__ (self ):
4951 self .storage_path  =  get_env ("FLATNOTES_PATH" , mandatory = True )
                                 You can’t perform that action at this time. 
               
                  
0 commit comments