Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Syntax Coloring Wrong for PHP tags in attributes #3

Closed
jakob opened this Issue · 2 comments

2 participants

@jakob

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

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
Owner

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

@infininight infininight closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.