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

HTML after PHP is indented #826

Closed
Hirse opened this issue Dec 9, 2015 · 2 comments
Closed

HTML after PHP is indented #826

Hirse opened this issue Dec 9, 2015 · 2 comments

Comments

@Hirse
Copy link
Contributor

Hirse commented Dec 9, 2015

Any PHP block causes all following tags to be indented by one level.

This came up as brackets-beautify/brackets-beautify#178 in Brackets Beautify, and has also been mentioned here #714 (comment).

Input:

<?php ?>
<!DOCTYPE html>
<html>
<head></head>

<body></body>
</html>

Output:

<?php ?>
    <!DOCTYPE html>
    <html>

    <head></head>

    <body></body>

    </html>

Desired Output:

<?php ?>
<!DOCTYPE html>
<html>

    <head></head>

    <body></body>

</html>
@cyberbeat
Copy link

cyberbeat commented May 25, 2018

It would be nice, if this would also work for php "short-open-tags", for example
<? include("include.php"); ?>

@Hirse
Copy link
Contributor Author

Hirse commented May 25, 2018

@bitwiseman would it be as easy as just adding ? and ?= to the list of single_tokens to support php short tags (<? ?>) and short echo tags (<?= ?>)?

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

No branches or pull requests

3 participants