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

Problem with <?php Tags #3

Open
paladisco opened this issue Jun 27, 2014 · 3 comments
Open

Problem with <?php Tags #3

paladisco opened this issue Jun 27, 2014 · 3 comments

Comments

@paladisco
Copy link

While your awesome script works perfectly in pure HTML files, when i try to run it on files containing PHP Code, all the <?php tags somehow get eliminated. I take it that the ? somehow interferes with regex syntax but that's just a guess.

@robert-b-clarke
Copy link
Owner

Hi, the script uses python's built in HTML parser instead of regexes. This means it can work with lightweight templating languages that can be parsed as HTML, for instance jinja or mustache. I suspect the HTML parser is throwing away the <?php tags, and potentially tripping over whatever is inside them, but I need to take a closer look. It might not be easily fixable, unfortunately.

@paladisco
Copy link
Author

I see! Thanks for taking a closer look at the issue. Unfortunately, i'm not that experienced in Python, otherwise i'd look into it myself.

Heck, maybe that would be a good opportunity to finally learn the language. ;)

@alexschwarz89
Copy link

Another example of better read before :-)

Broke all my php template tags, thanks to git. :-)

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

No branches or pull requests

3 participants