brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] 1.6 can not properly identify end tags in xml/html #10443

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by ketansp Friday Jan 22, 2016 at 13:51 GMT Originally opened as https://github.com/adobe/brackets/issues/12137


In version 1.6, brackets can not properly identify the end tags of xml/html files and thus marks the directive in red colour.

core-ai-bot commented 3 years ago

Comment by petetnt Friday Jan 22, 2016 at 13:53 GMT


Can you provide an example of an markup that gets improperly highlighted as red? In 1.5 (and below) there was an issue where structurally non-valid (by HTML5 standards, not necessarily non-working) end tags weren't shown as red.

core-ai-bot commented 3 years ago

Comment by ketansp Friday Jan 22, 2016 at 14:11 GMT


Herewith sharing a screenshot of the bug and underlying sample code.

screenshot-92

<ion-view view-title="Home">
    <ion-content class="padding-horizontal padding-vertical margin-top-50">
        <div>
            <button class="button button-block button-positive" type="button">
                button 1
            </button>
            <button class="button button-block button-positive" type="button">
                button 2
            </button>
            <button class="button button-block button-positive" type="button">
                button 3
            </button>
        </div>
        <div>
            <form class="margin-top-20" novalidate>
                <label class="item item-input">
                    <input type="text" placeholder="Question"></input>
                </label>

            </form>
        </div>
    </ion-content>
</ion-view>
core-ai-bot commented 3 years ago

Comment by petetnt Friday Jan 22, 2016 at 14:25 GMT


The issue there is that <input> element shouldn't have an end tag

https://developer.mozilla.org/en/docs/Web/HTML/Element/Input

Permitted content None, it is an empty element. Tag omission: Must have a start tag and must not have an end tag.

If you change your mark up to

<ion-view view-title="Home">
    <ion-content class="padding-horizontal padding-vertical margin-top-50">
        <div>
            <button class="button button-block button-positive" type="button">
                button 1
            </button>
            <button class="button button-block button-positive" type="button">
                button 2
            </button>
            <button class="button button-block button-positive" type="button">
                button 3
            </button>
        </div>
        <div>
            <form class="margin-top-20" novalidate>
                <label class="item item-input">
                    <input type="text" placeholder="Question">
                </label>

            </form>
        </div>
    </ion-content>
</ion-view>

the red errors will disappear.

core-ai-bot commented 3 years ago

Comment by thedigitaldev Friday Jan 22, 2016 at 20:58 GMT


Issue is with your input tag. It's not valid HTML5. You didn't show us what DOCTYPE you were using though.

Update: Testing closing input tag in Brackets with old xhtml doctype.

capture

Brackets still recognizes the closing input tag as invalid even with deprecated xhtml tag. Since your using ionic, you really shouldn't be using anything other than HTML5, which includes not having to self-close or close the input tag. Hope this helped.

core-ai-bot commented 3 years ago

Comment by ficristo Wednesday Aug 17, 2016 at 07:45 GMT


input is an autoclosing tag. If you want to close it you can write <input type="text" />.