mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 01:37:23 +00:00
Replace quotes in term lookup to allow matching multi-word term (#32284)
This commit is contained in:
parent
ae4a4244f4
commit
3ecd83af26
@ -20,6 +20,7 @@ module Jekyll
|
|||||||
end
|
end
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
|
@term.gsub!(/\"/, "")
|
||||||
entries = context.registers[:site].data["glossary"].select do |entry|
|
entries = context.registers[:site].data["glossary"].select do |entry|
|
||||||
entry.key?("term") and (@term.casecmp(entry["term"]).zero? or (entry.key?("aliases") and entry["aliases"].any?{ |s| s.casecmp(@term)==0 }))
|
entry.key?("term") and (@term.casecmp(entry["term"]).zero? or (entry.key?("aliases") and entry["aliases"].any?{ |s| s.casecmp(@term)==0 }))
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user