1

I am using google code prettify. After a page renders, I decided to check how <code> and <pre> tags and their contents were manipulated.
But in view source, I found no changes were made (in contrast to online syntax highlighters, which generate css style code with code text).
So, how/where is info about keywords, variable, comments, etc (from code tag text) stored and manipulated?

1
  • 2
    I just picked a question at random, looked at a code snippet within it, and looking at the DOM it's riddled with <span> tags inside of the code block...
    – Servy
    Aug 28, 2013 at 19:49

1 Answer 1

1

In "view source", you see the original source downloaded. What you'd get with wget or lynx for example.

The end result you see has been manipulated by Google Code Prettify's JavaScript code, and can be seen with tools such as Chrome Dev Tools or Firefox Dev Tools.

As Servy said, the DOM is riddled with <span> tags and the likes.

1
  • oh yes, I am using IE8 at workplace, with devtools options, and others turnned off, so i could not see it, would check at home, and give update soon.
    – msinfo
    Aug 28, 2013 at 20:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.