Fix links to notes in footnotes

This commit is contained in:
Maxime Vaillancourt
2021-09-15 18:07:47 -04:00
parent 1fd0f25561
commit 60e3ece8ff
2 changed files with 3 additions and 6 deletions

View File

@@ -57,7 +57,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator
# links by greying them out and changing the cursor
current_note.content = current_note.content.gsub(
/\[\[([^\]]+)\]\]/i, # match on the remaining double-bracket links
<<~HTML.chomp # replace with this HTML (\\1 is what was inside the brackets)
<<~HTML.delete("\n") # 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 class='invalid-link-brackets'>[[</span>
\\1