- Added optional context parameter to return only variables not present in the provided context.
- Added test tests/get_undeclared_variables.py:
- Verifies behavior before rendering (all variables)
- Verifies after rendering with incomplete context (only missing variables)
- Verifies after rendering with complete context (empty set)
- Verifies compatibility with custom Jinja2 environment
- All tests use asserts and are ready for CI integration.
Closes#585
There are small typos in:
- docs/index.rst
- docxtpl/__main__.py
- docxtpl/template.py
- tests/embedded.py
Fixes:
- Should read `surrounding` rather than `surronding`.
- Should read `rendering` rather than `rendring`.
- Should read `providing` rather than `provinding`.
- Should read `optionally` rather than `optionnally`.
- Should read `optional` rather than `optionnal`.
- Should read `necessary` rather than `neccessary`.
- Should read `existing` rather than `exsting`.
- Should read `embedded` rather than `embdded`.
- Should read `dictionaries` rather than `dictionnaries`.
- Should read `cleaning` rather than `cleanning`.
- Should read `catches` rather than `cacthes`.
Signed-off-by: Tim Gates <tim.gates@iress.com>