Fix whitespace in plugin

This commit is contained in:
Maxime Vaillancourt 2020-12-07 21:39:38 -05:00
parent 1abe938cd3
commit 7aea426c64

View File

@ -52,8 +52,8 @@ 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)
<span title='There is no note that matches this title.' class='invalid-link'>
<<~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 class='invalid-link-brackets'>[[</span>
\\1
<span class='invalid-link-brackets'>]]</span></span>
@ -63,7 +63,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator
# Identify note backlinks and add them to each note
all_notes.each do |current_note|
# Nodes: Jekyll
# Nodes: Jekyll
notes_linking_to_current_note = all_notes.filter do |e|
e.content.include?(current_note.url)
end
@ -75,7 +75,7 @@ class BidirectionalLinksGenerator < Jekyll::Generator
label: current_note.data['title'],
} unless current_note.path.include?('_notes/index.html')
# Edges: Jekyll
# Edges: Jekyll
current_note.data['backlinks'] = notes_linking_to_current_note
# Edges: Graph