Packages: [XML] Multilines comments as <!---------> break the syntax

Created on 19 May 2017  路  3Comments  路  Source: sublimehq/Packages

If I put a space on the <!-- ----- -->, it does highlight correctly. I am on Sublime Text Build 3131.

image

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="2.0">
<dict>
    <key>settings</key>
    <array>
        <!------------------ Bracket Highlighter Package theme ---------------------->
        <dict>
            <key>name</key>
            <string>String</string>
            <key>scope</key>
            <string>
                , string,
                , punctuation.definition.string,
            </string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#808080</string>
            </dict>
        </dict>
        <!--
            `entity.name.function` is designed for: java, rust, makefile, AmxxPawn, preprocessor
        -->
        <dict>
            <key>name</key>
            <string>Bold text</string>
            <key>scope</key>
            <string>
                , boldtext,
                , markup.bold,
                , meta.tag.value.bbcode,
                , constant.language.registers.general-purpose ,
            </string>
            <key>settings</key>
            <dict>
                <key>fontStyle</key>
                <string>bold</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

Most helpful comment

See also https://github.com/sublimehq/Packages/pull/835 for a more accurate description. The issue I linked earlier is for HTML.

All 3 comments

This is invalid XML. ST is doing it "right". https://github.com/SublimeTextIssues/Core/issues/1018

Thanks, I checked the syntax with https://www.w3schools.com/xml/xml_validator.asp and fixed it.

See also https://github.com/sublimehq/Packages/pull/835 for a more accurate description. The issue I linked earlier is for HTML.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jfcherng picture jfcherng  路  3Comments

okdana picture okdana  路  3Comments

jcberquist picture jcberquist  路  4Comments

mouse07410 picture mouse07410  路  3Comments

caub picture caub  路  3Comments