mirror of https://github.com/docker/docs.git
relative_links_filter: do not replace html link
Do not manipulate links that don't point to a .md file. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8a85eaca60
commit
754d60430d
|
@ -97,12 +97,16 @@ module Jekyll
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def mdtarget?(string)
|
||||||
|
string&.include?(".md")
|
||||||
|
end
|
||||||
|
|
||||||
def fragment?(string)
|
def fragment?(string)
|
||||||
string&.start_with?("#")
|
string&.start_with?("#")
|
||||||
end
|
end
|
||||||
|
|
||||||
def replaceable_link?(string)
|
def replaceable_link?(string)
|
||||||
!fragment?(string) && !absolute_url?(string)
|
mdtarget?(string) && !fragment?(string) && !absolute_url?(string)
|
||||||
end
|
end
|
||||||
|
|
||||||
def global_entry_filter
|
def global_entry_filter
|
||||||
|
|
Loading…
Reference in New Issue