zzyengineer / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

added css, inline syntax highlight #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. just try to highlight a css file, it highlights with source decorator,
which is not proper for css
2. <style></style> tags dont hightlight correctly
3.
(Please include HTML, not just your source code)

What is the expected output?  What do you see instead?

What version are you using?  On what browser?

Please provide any additional information below.

i couldnt find a decorator for css, so i created one (lang-css.js), its not
perfect but does the job, for inline <style> tags i had to make a small
modification at prettify.js at splitSourceNodes (see attached diff file ).

hope it helps.

Original issue reported on code.google.com by aybars.b...@gmail.com on 9 Oct 2008 at 11:50

Attachments:

GoogleCodeExporter commented 9 years ago
This works great! Hope the change to main prettifier js was not required.

Original comment by shama...@gmail.com on 9 Dec 2008 at 8:54

GoogleCodeExporter commented 9 years ago
Thanks for the patch.  Will try it out.

Original comment by mikesamuel@gmail.com on 6 Jan 2009 at 10:44

GoogleCodeExporter commented 9 years ago
In r60, I added CSS support.  I used a slightly different lang-css, and since 
I'd
already revised the embedded source code stuff to get lang-wiki to work, I 
changed
the HTML lexer to use the same scheme.

Original comment by mikesamuel@gmail.com on 9 Jan 2009 at 6:01