Skip to content
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

[Feature] Add the ability to keep unknown tags #94

Merged
merged 3 commits into from
Mar 21, 2021

Conversation

Dylan-Brotherston
Copy link
Contributor

Add a new option keep (default: False) to chevron.renderer.render() that allows for unknown tags to be kept in the returned string for later processing, eg: eval().

Add a new option `keep` (default: False) to `chevron.renderer.render()` that allows for unknown tags to be kept in the returned string for later processing, eg: `eval()`.
@coveralls
Copy link

coveralls commented Mar 20, 2021

Coverage Status

Coverage increased (+0.006%) to 99.209% when pulling 410a9c1 on Dylan-Brotherston:main into 90413a2 on noahmorrison:main.

@noahmorrison
Copy link
Owner

Seems like a nice feature, would you mind adding some unit tests for this? Take a look at the test_spec.py file and let me know if you need any help.

The first test checks that tags are kept.
Including that fact that kept tags are normalised.

The second test checks that tags from partials are kept.
@noahmorrison noahmorrison merged commit 5e1c128 into noahmorrison:main Mar 21, 2021
@noahmorrison
Copy link
Owner

LGTM, Thanks for adding those!

I really do want to cleanup the parameter passing at some point, but that's not necessarily this PR's fault

@alexberazouski
Copy link

Hey @noahmorrison . This seems like not yet released feature. Would you mind to make one please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants