bids-specification
bids-specification copied to clipboard
[MAINT] use jinja in the macros
this is just a test to see if using jinja templates in the macros could help with our rendering of HTML / PDF
- closes https://github.com/bids-standard/bids-specification/issues/2069
- AFAICT using jinja templates already fixes: https://github.com/bids-standard/bids-specification/issues/2069
@oesteban
descriptions are back in pdf and still there in html:
a few oddities:
ordered list are a quote blocked in the html version:
or don't have the proper 'order' in pdf (item 1. appears twice)
Also see https://bids-specification--2083.org.readthedocs.build/en/2083/glossary.html#stimuluspresentation-metadata
or similarly:
-
https://bids-specification--2083.org.readthedocs.build/en/2083/glossary.html#deidentificationmethodcodesequence-metadata
-
https://bids-specification--2083.org.readthedocs.build/en/2083/glossary.html#genetics-metadata
ordered list are a quote blocked in the html version:
I believe this is not a bug - we need to remove the indentation from the common principles yaml (it was added precisely because the current parser would otherwise render something funky).
https://github.com/bids-standard/bids-specification/blob/7f5e0a778e8aec08e1d6743f19626c929d91e69c/src/schema/objects/common_principles.yaml#L11-L48
ordered list are a quote blocked in the html version:
I believe this is not a bug - we need to remove the indentation from the common principles yaml (it was added precisely because the current parser would otherwise render something funky).
https://github.com/bids-standard/bids-specification/blob/7f5e0a778e8aec08e1d6743f19626c929d91e69c/src/schema/objects/common_principles.yaml#L11-L48
ha yeah good catch!
will probably focus refactoring by getting macros to use jinja first with 'no change in behavior' and then tackle remaining 'bugs' in a follow up PRs
also I would not mind have more explicit tests for some of this because working on this feels like flying blind.
I believe this is not a bug - we need to remove the indentation from the common principles yaml (it was added precisely because the current parser would otherwise render something funky).
to keep track of as well:
this may affect the rendering of the list in the common principles: