Merge branch 'master' into patch-2
This commit is contained in:
commit
8b2dba86ab
@ -25,28 +25,28 @@ class BidirectionalLinksGenerator < Jekyll::Generator
|
|||||||
|
|
||||||
# Replace double-bracketed links with label using note title
|
# Replace double-bracketed links with label using note title
|
||||||
# [[A note about cats|this is a link to the note about cats]]
|
# [[A note about cats|this is a link to the note about cats]]
|
||||||
current_note.content = current_note.content.gsub(
|
current_note.content.gsub!(
|
||||||
/\[\[#{title_from_filename}\|(.+?)(?=\])\]\]/i,
|
/\[\[#{title_from_filename}\|(.+?)(?=\])\]\]/i,
|
||||||
anchor_tag
|
anchor_tag
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace double-bracketed links with label using note filename
|
# Replace double-bracketed links with label using note filename
|
||||||
# [[cats|this is a link to the note about cats]]
|
# [[cats|this is a link to the note about cats]]
|
||||||
current_note.content = current_note.content.gsub(
|
current_note.content.gsub!(
|
||||||
/\[\[#{note_potentially_linked_to.data['title']}\|(.+?)(?=\])\]\]/i,
|
/\[\[#{note_potentially_linked_to.data['title']}\|(.+?)(?=\])\]\]/i,
|
||||||
anchor_tag
|
anchor_tag
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace double-bracketed links using note title
|
# Replace double-bracketed links using note title
|
||||||
# [[a note about cats]]
|
# [[a note about cats]]
|
||||||
current_note.content = current_note.content.gsub(
|
current_note.content.gsub!(
|
||||||
/\[\[(#{note_potentially_linked_to.data['title']})\]\]/i,
|
/\[\[(#{note_potentially_linked_to.data['title']})\]\]/i,
|
||||||
anchor_tag
|
anchor_tag
|
||||||
)
|
)
|
||||||
|
|
||||||
# Replace double-bracketed links using note filename
|
# Replace double-bracketed links using note filename
|
||||||
# [[cats]]
|
# [[cats]]
|
||||||
current_note.content = current_note.content.gsub(
|
current_note.content.gsub!(
|
||||||
/\[\[(#{title_from_filename})\]\]/i,
|
/\[\[(#{title_from_filename})\]\]/i,
|
||||||
anchor_tag
|
anchor_tag
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user