fix scanning for tags in content
This commit is contained in:
		@@ -86,7 +86,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
 | 
			
		||||
                if (
 | 
			
		||||
                  opts.prettyLinks &&
 | 
			
		||||
                  node.children.length === 1 &&
 | 
			
		||||
                  node.children[0].type === "text"
 | 
			
		||||
                  node.children[0].type === "text" &&
 | 
			
		||||
                  !node.children[0].value.startsWith("#")
 | 
			
		||||
                ) {
 | 
			
		||||
                  node.children[0].value = path.basename(node.children[0].value)
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
@@ -115,7 +115,7 @@ const commentRegex = new RegExp(/%%(.+)%%/, "g")
 | 
			
		||||
const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/)
 | 
			
		||||
// (?:^| )   -> non-capturing group, tag should start be separated by a space or be the start of the line
 | 
			
		||||
// #(\w+)    -> tag itself is # followed by a string of alpha-numeric characters
 | 
			
		||||
const tagRegex = new RegExp(/(?:^| )#(\w+)/, "g")
 | 
			
		||||
const tagRegex = new RegExp(/(?:^| )#([\w-_\/]+)/, "g")
 | 
			
		||||
 | 
			
		||||
export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options> | undefined> = (
 | 
			
		||||
  userOpts,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user