-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example keys with dashes are inaccessible #20
Comments
Thanks for your help with this! I think we might want a different approach, because (at least for me?) this creates a valid Jinja template, but it doesn't actually render the template correctly because there's still a key of "label-coarse" in the dictionary coming from the dataset library. (It renders part of the template, but it doesn't show the answer to the question.) So instead of modifying the templates, I think we need to modify the examples. |
Ah! Yes, see if this works? Changes both examples and template. I can see the render happening without the label error and the label being displayed. |
Seems to be a quirk of the way we're using Jinja. See, e.g., TREC. A template like
doesn't render correctly because
label-coarse
is parsed aslabel
. See, e.g., https://stackoverflow.com/questions/28652373/jinja2-in-variable-bugCan probably just fix by replacing dashes with underscores in keys of the example dictionary when rendering. Might be good to change the displayed information in the sidebar on the fly to match.
The text was updated successfully, but these errors were encountered: