fix scanning for tags in content
This commit is contained in:
		
							parent
							
								
									ed62ece491
								
							
						
					
					
						commit
						83269ac26e
					
				
					 3 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
					@ -5,10 +5,8 @@ draft: true
 | 
				
			||||||
## todo
 | 
					## todo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- wikilink to anchors in the same document
 | 
					- wikilink to anchors in the same document
 | 
				
			||||||
- folders, tags, and content emit overlapping (e.g. for tags/component)
 | 
					- blockquote with link in first child broken
 | 
				
			||||||
- 404 using base url
 | 
					- 404 using base url
 | 
				
			||||||
- nested tags showing duplicate
 | 
					 | 
				
			||||||
  - tag page markdown file for description not being rendered
 | 
					 | 
				
			||||||
- back button with anchors / popovers + spa is broken
 | 
					- back button with anchors / popovers + spa is broken
 | 
				
			||||||
- search should be fast for large repos
 | 
					- search should be fast for large repos
 | 
				
			||||||
- debounce cfg rebuild on large repos
 | 
					- debounce cfg rebuild on large repos
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,7 +86,8 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options> | undefined> =
 | 
				
			||||||
                if (
 | 
					                if (
 | 
				
			||||||
                  opts.prettyLinks &&
 | 
					                  opts.prettyLinks &&
 | 
				
			||||||
                  node.children.length === 1 &&
 | 
					                  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)
 | 
					                  node.children[0].value = path.basename(node.children[0].value)
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,7 +115,7 @@ const commentRegex = new RegExp(/%%(.+)%%/, "g")
 | 
				
			||||||
const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/)
 | 
					const calloutRegex = new RegExp(/^\[\!(\w+)\]([+-]?)/)
 | 
				
			||||||
// (?:^| )   -> non-capturing group, tag should start be separated by a space or be the start of the line
 | 
					// (?:^| )   -> 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
 | 
					// #(\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> = (
 | 
					export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options> | undefined> = (
 | 
				
			||||||
  userOpts,
 | 
					  userOpts,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue