rayantony / google-code-prettify

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

Not formatting properly formatted ML language #218

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put the following code into my blog:

<pre class="prettyprint" style="white-space: pre-wrap; word-wrap: break-word;">
<item label="Suspend">
    <action name="Execute">
        <execute>pm-suspend</execute>
    </action>
    <action name="Execute">
        <execute>xlock</execute>
    </action>
</item>
</pre>
2. When I view the blog post, all I can see is the words pm-suspend and xlock. 
Nothing else is showing up.
3. Every other piece of code I have used up to this point has formatted 
properly (so I know the problem is not in my setup).

What is the expected output?  What do you see instead?
I expect to see formatted code. Instead, I can only see the words 'pm-suspend' 
and 'xlock.'

What version are you using?  On what browser?
Latest. Chrome.

Please provide any additional information below.
See screenshot for more information.

Original issue reported on code.google.com by jason.ca...@gmail.com on 21 May 2012 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago
You need to escape code inside <pre> elements or put it inside an <xmp> 
element.  So "<item" -> "<item".  Prettify works on the text of a code block, 
not the inner HTML.

Original comment by mikesamuel@gmail.com on 21 May 2012 at 9:33

GoogleCodeExporter commented 9 years ago
Thank you much. That fixed the problem. Must have missed that in the 
documentation (or, if I didn't, maybe it can be added?).

Original comment by jason.ca...@gmail.com on 24 May 2012 at 1:53

GoogleCodeExporter commented 9 years ago

Original comment by mikesamuel@gmail.com on 29 Jun 2012 at 2:58