美化无法在括号中的PHP之后缩进HTML

问题描述 投票:1回答:1

我知道美化无法正确缩进PHP。我只想要它跳过它,因为在页面内的PHP代码之后我得到了奇怪的空格。

这里是屏幕截图:

screenshot

我一直在尝试很多插件,环顾了一个小时,我很生气!

有人可以帮忙吗?谢谢:)

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="style.css">

    <title>MicroCMS - Home</title>
</head>

<body>
    <header>
        <h1>MicroCMS</h1>
    </header>

    <?php foreach ($articles as $article) : ?>
        <article>
            <h2><?php echo $article['art_title']; ?></h2>
            <p>
                <?php echo $article['art_content']; ?>
            </p>
        </article>
        <?php endforeach; ?>

            <footer>
                <a href="http://www.test.fr/">MircroCMS</a> is a student work
            </footer>

</body>

</html>
php html adobe-brackets js-beautify
1个回答
0
投票
它使用快捷键

Ctrl + Alt +

I

首先转到文件>

    扩展管理器并搜索
  1. Indentator。
  2. 安装完成后,使用Crtl + Alt +
  3. I,它应该可以正常工作。
© www.soinside.com 2019 - 2024. All rights reserved.