moohaad / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Make C++ style comments color correctly in embedded CSS in HTML #223

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In HTML, CSS syntax highlighting is provided between the <style></style>
tags. However, I noticed that C++ style comments are not treated as
comments. In my particular case, C++ comments are valid in CSS. Code is not
syntax highlighted as comments when I preceed it with //

This colors properly:
body
{
  /* display: block; */
}

This does NOT color properly:
body
{
  // display: block;
}

Original issue reported on code.google.com by rcdai...@gmail.com on 29 May 2008 at 10:44

GoogleCodeExporter commented 9 years ago
As far as I can tell such comments are not valid in CSS see below.

Q5410 How do I include comments in CSS?

As with any other language, you probably want to include comments, to make 
things
easier, not only for yourself, but also for your users.

In CSS comments begin with "/*" and end with "*/".

Here's an example:

<STYLE>
/* As big as it gets */
P.big {font-size: 72px}
</STYLE>

Original comment by pyscripter on 29 May 2008 at 11:21