Update bidirectional_links_generator.rb
Make 'invalid_wiki_link' regex less greedy.
This commit is contained in:
		
							parent
							
								
									c421400ae9
								
							
						
					
					
						commit
						bf7e92f9d3
					
				| @ -56,7 +56,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator | |||||||
|       # pointing to non-existing pages, so let's turn them into disabled |       # pointing to non-existing pages, so let's turn them into disabled | ||||||
|       # links by greying them out and changing the cursor |       # links by greying them out and changing the cursor | ||||||
|       current_note.content = current_note.content.gsub( |       current_note.content = current_note.content.gsub( | ||||||
|         /\[\[(.*)\]\]/i, # match on the remaining double-bracket links |         /\[\[([^\]]+)\]\]/i, # match on the remaining double-bracket links | ||||||
|         <<~HTML.chomp    # replace with this HTML (\\1 is what was inside the brackets) |         <<~HTML.chomp    # replace with this HTML (\\1 is what was inside the brackets) | ||||||
|           <span title='There is no note that matches this link.' class='invalid-link'> |           <span title='There is no note that matches this link.' class='invalid-link'> | ||||||
|             <span class='invalid-link-brackets'>[[</span> |             <span class='invalid-link-brackets'>[[</span> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 manunamz
						manunamz