Viktor
Viktor

Reputation: 722

Sublime text 3 plugin Bracket highlighter not working correctly

When i paste code inside a document, it's stops highlighting brackets of all document and shows question mark near all div elements..

Sublime text 3 Brackets Highlighting

How can i solve this problem?

Before, it's highlighting open and closed tag enter image description here

After pasting code inside , its showing question mark for all document..

Upvotes: 1

Views: 1374

Answers (1)

MattDMo
MattDMo

Reputation: 102842

The reason you're seeing this issue is because you have improperly nested tags in the <header> section. Your code is as follows:

    <a href="#"><h1 class="title">Document</a><a href="#!/about-us" id="show-about-btn">▼</a></h1>
<!--open a      open h1                 close a|open a                               close a|close h1-->

or, in a condensed version:

<a><h1></a><a></a></h1>

You can fix this by switching the first <a> and the <h1>:

<h1 class="title">
    <a href="#">Document</a>
    <a href="#!/about-us" id="show-about-btn">▼</a>
</h1>

Everything is now properly nested, and the bracket highlighting will work as expected:

Upvotes: 2

Related Questions