1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Fix unresolved data lookups on GitHub Glossary page (#16815)

* Support [...] in data tag path

* Use forloop.index0 to get data tag path

* Commit whitespace change to not keep getting it

* Recursively render glossary terms as well

* Add tests to verify Liquid data tag can handle bracketed access

* Remove superfluous 'set' for context in tests

* Avoid the mystery guest anti-pattern... move the test data closer to the test

* Escape the `-` character in the data regex

Co-authored-by: Jason Etcovitch <jasonetco@github.com>
Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
This commit is contained in:
James M. Greene
2020-12-09 18:58:00 -06:00
committed by GitHub
parent 9725758ab4
commit e6518ff9c3
3 changed files with 53 additions and 8 deletions

View File

@@ -10,8 +10,8 @@ versions:
---
{% for term in site.data.glossaries.external %}
### {{term.term}}
{{term.description}}
### {% data glossaries.external[forloop.index0].term %}
{% data glossaries.external[forloop.index0].description %}
---
{% endfor %}