#1447 Wrong HTML/XML highlight

Bug
closed-fixed
5
2015-03-31
2013-02-19
jamesd
No

When using language HTML and if line is commented out (html style) the syntax highlight between tags '<?' '?>' is wrong.
Example:

< !-- this is some xml code commented out <?xml...?> -->

The part "<?xml...?>" will NOT be highlighted as comment (green font)

Related

Bugs: #497

Discussion

  • Neil Hodgson

    Neil Hodgson - 2013-02-19
    • labels: Wrong HTML/XML highlight --> Wrong HTML/XML highlight, scintilla
    • status: open --> open-fixed
    • assigned_to: Neil Hodgson
     
  • Colomban Wendling

    Although I think this feature can indeed be useful for some, I think it must be a setting. Because when using e.g. PHP, no matter the code is in an HTML comment it will be processed, so this change gives the false impression there is no PHP script there:

    <!-- some commented out <?php echo $var ?> snippet -->
    

    IMO, this feature should be configurable through a property.

     
  • Neil Hodgson

    Neil Hodgson - 2013-02-22

    If PHP is always introduced with <?php then that could be treated specially without the need for another property.

     
  • Colomban Wendling

    PHP might be introduced with <? if its short_open_tag option is enabled, but it is considered legacy feature (because it clashes with XML's <?xml) so yeah, it's probably safe to consider that PHP starts with <?php.

    However if it's here only not to highlight commented <?xml ... ?>, which you pointed out yourself being not valid, I don't see much point in this "fix" and would rather see it revered.

    This said I don't mind much what's done, as far as preprocessors like PHP inside XML comments can still be highlighted.

     
  • Neil Hodgson

    Neil Hodgson - 2013-02-22

    Commit [657c09] modifies previous change to not affect <?php or <? .

     

    Related

    Commit: [657c09]

  • Neil Hodgson

    Neil Hodgson - 2013-02-26
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks