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 Request]: Support nested PHP tags #100

Open
vinkla opened this issue May 6, 2024 · 1 comment
Open

[Feature Request]: Support nested PHP tags #100

vinkla opened this issue May 6, 2024 · 1 comment

Comments

@vinkla
Copy link

vinkla commented May 6, 2024

This plugin is excellent for formatting PHP templates with and without Blade syntax. Nested PHP tags do not appear to be indented unless there is HTML between them.

<?php if (have_posts()): ?>

<?php while (have_posts()): ?>

<article>
    <header>
        <h1><?php the_title(); ?></h1>
    </header>
</article>

<?php endwhile; ?>

<?php endif; ?>

It works better if you place an HTML tag between the if and while statements.

<?php if (have_posts()): ?>

<div>
    <?php while (have_posts()): ?>

    <article>
        <header>
            <h1><?php the_title(); ?></h1>
        </header>
    </article>

    <?php endwhile; ?>
</div>

<?php endif; ?>
@JohnathonKoster
Copy link
Contributor

I'll think on this one for a bit (it would be neat, but very non-trivial)

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

2 participants