Skip to content

Commit

Permalink
Fix invalid link matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
maximevaillancourt committed Nov 15, 2020
1 parent f297a68 commit a6e1a8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _plugins/bidirectional_links_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def generate(site)
# 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)
<span title='There is no note that matches this title.' class='invalid-link'>
<span class='invalid-link-brackets'>[[</span>
Expand Down

0 comments on commit a6e1a8d

Please sign in to comment.