Syntax Coloring Wrong for PHP tags in attributes #3

Closed
jakob opened this Issue Feb 6, 2010 · 2 comments

Comments

Projects
None yet
2 participants
@jakob

jakob commented Feb 6, 2010

The HTML bundle incorrectly highlights the syntax whenever I use inline PHP code inside a tag as an attribute, and I don't quote it. (quotes are optional in HTML5)

Example

<!DOCTYPE HTML>
<html>
<head>
    <meta charset=utf-8>
</head>
<body>
    <?$p=0?>
    <p id=paragraph<?=++$p?>>
        This is test paragraph <?=$p?>.
    </p>
    <p id="paragraph<?=$p++?>">
        This is test paragraph <?=$p?>.
    </p>
    <p id=paragraph<?=++$p?>>
        This is test paragraph <?=$p?>.
    </p>
    <p id="paragraph<?=$p++?>">
        This is test paragraph <?=$p?>.
    </p>
</body>
</html>

Syntax highlighting breaks until the next quote occurs.

@jakob

This comment has been minimized.

Show comment Hide comment
@jakob

jakob Feb 6, 2010

I just figured out this only happens with the id attribute: for me, removing the "tag-id-attribute" thing from the languages file fixed this (but of course this removes special highlighting of the id attribute)

jakob commented Feb 6, 2010

I just figured out this only happens with the id attribute: for me, removing the "tag-id-attribute" thing from the languages file fixed this (but of course this removes special highlighting of the id attribute)

@infininight

This comment has been minimized.

Show comment Hide comment
@infininight

infininight May 9, 2015

Member

This was corrected at some point when transitioning to the new PHP grammar.

Member

infininight commented May 9, 2015

This was corrected at some point when transitioning to the new PHP grammar.

@infininight infininight closed this May 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment