#3873 Block comments broken in script tags in HTML mode.

minor bug
closed-invalid
nobody
5
2014-07-14
2014-07-12
Darien Brown
No

Multi-line comments in JavaScript using / / are broken. The remainder of the JavaScript after */ is highlighted as a comment too. Sample HTML file and screenshot attached.

The problem appears to be with the span_regexp that is meant to prevent a block comment from consuming the closing script tag.

Changing the ending regexp to <END REGEXP="TRUE">(?i)(?=*/|</SCRIPT\b)</END> appears to fix it, but leaves the comment closing without highlighting.

I'm not entirely sure how to fix this properly, so I'll leave it to the experts.

2 Attachments

Discussion

  • Darien Brown
    Darien Brown
    2014-07-12

    Just noticed that SF stripped the asterisks. That first sentence refers to the JavaScript block comment - slash star and star slash.

     
  • Darien Brown
    Darien Brown
    2014-07-12

    Oh... and this is jEdit 5.1 pre 1

     
  • Darien Brown
    Darien Brown
    2014-07-12

    This appears to have been introduced in patch 504, but appears to have been removed for 5.2 pre 1.

    This can be closed as invalid.

     
  • Dale Anson
    Dale Anson
    2014-07-14

    • status: open --> closed-invalid
     
  • Dale Anson
    Dale Anson
    2014-07-14

    I saw the same problem, upgrading to the latest 5.2pre1 code fixed it.