-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add option to ignore templating tags #691
Comments
@maxnordlund this seems a repeat of closed #310, Nov, 2015, but maybe it is time to look again... First Having said that, It has to be repeated with a config of All I can say at this point is that comments, patches, PR's would certainly be reviewed, and provided there were no adverse consequences to tidy's html parsing, considered for inclusion... Look forward to further feedback... thanks... |
Not quite, it's about the general case and as such I do believe it should be in tidy. You're right that tidy mostly ignores templating languages, but there are places where it doesn't which generates false positives. Those are when free text is not allowed, like I agree that you should need the In order to do this in a sane way, I suggest adding some sort of config for templating start/end tags that tidy matches, and completely ignores, Does this make it clearer? What do you think about that type of option? (Name up to debate of course.) |
I think general support for handling templating tags |
After reading #310 I think an option to ignore templating tags would solve it along with any other templating language the user might have.
Taking the Jinja/Django example from that issue:
If tidy could be, in this case, convinced to ignore
{% .. %}
and{ ... }
tags then it would parse correctly. Same goes for the popular mustaches syntax{{ ... }}
and<% ... %>
for ERB/EEX.This is a more general solution, and is similar to the custom tags option that already exists. What do you think?
The text was updated successfully, but these errors were encountered: