From bf7e92f9d3a6438da21a0df7729871dde2289a8a Mon Sep 17 00:00:00 2001 From: manunamz <75578970+manunamz@users.noreply.github.com> Date: Fri, 11 Jun 2021 20:55:28 -0400 Subject: [PATCH] Update bidirectional_links_generator.rb Make 'invalid_wiki_link' regex less greedy. --- _plugins/bidirectional_links_generator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/bidirectional_links_generator.rb b/_plugins/bidirectional_links_generator.rb index 1d89e00..1b15849 100644 --- a/_plugins/bidirectional_links_generator.rb +++ b/_plugins/bidirectional_links_generator.rb @@ -56,7 +56,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator # pointing to non-existing pages, so let's turn them into disabled # links by greying them out and changing the cursor 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) [[