JavaScript & CSS syntax highlighting

Bug #869516 reported by Fred on 2011-10-06
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
chromium (Ubuntu)
chromium-browser (Ubuntu)
firefox (Ubuntu)
seamonkey (Ubuntu)

Bug Description

Add JavaScript & CSS syntax highlighting to source code viewer.

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-UK; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-UK; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2

View source does not currently appear to know how to do syntax highlighting CSS. This would be a very useful feature for web developers. Lots of open source editors can do this already, so it probably wouldn't be too hard to find a suitable highlighting method to copy.

I guess this could possibly extend to viewing text/css or .css files as well without using View Source.

(I find it hard to believe that there is not already a bug for this, but I really couldn't find anything like it in Bugzilla)

Reproducible: Always

Marking this as new because I didn't find any simmilar matches after a few searches. If this is a duplicate them please re-mark it.

-- Ryan

It would also be nice if the syntax highlighting is extended to the CSS content embedded in HTML source.

*** Bug 510532 has been marked as a duplicate of this bug. ***

Currently veiw-source: on .js .json and .css files is absolutely useless in fact there is no diff between two:


Small improvements like syntax highlighting and line numbers would make a huge difference!

tags: added: css javascript
Gabe Gorelick (gabegorelick) wrote :

The correct package is chromium-browser.

Changed in chromium (Ubuntu):
status: New → Invalid
Changed in seamonkey:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Confirmed

I'm going to move this into the source editor component. This is still an issue.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
Changed in firefox (Ubuntu):
status: New → Confirmed
Changed in seamonkey (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.