notepad4 icon indicating copy to clipboard operation
notepad4 copied to clipboard

嵌套的JavaScript``字符串在HTML语法高亮中无法正确识别

Open roj234 opened this issue 8 months ago • 2 comments

HTML语法高亮中的<script>块: Image JavaScript语法高亮: Image

图片中的文本:

            card.innerHTML = `
                <div class="header">
                    <span class="status-indicator"></span>
                    <h3>${pc.name || '未知设备'}</h3>
                    <div class="meta">
                        <div>最后在线:<span class="last-seen">-</span></div>
                        ${pc.uptime ? `<div>运行时间:<span class="uptime">-</span></div>` : ''}
                    </div>
                </div>`;

roj234 avatar Apr 24 '25 19:04 roj234

still exist in Action#2893

roj234 avatar Apr 24 '25 19:04 roj234

You can use PHP scheme to view/edit complex HTML file, it has better JavaScript and CSS support (issue #62). HTML scheme doesn't implement expression highlighting for JavaScript template literal, so no support for nesting (see https://github.com/ScintillaOrg/lexilla/issues/290).

Image

zufuliu avatar Apr 26 '25 00:04 zufuliu