tiesont / google-code-prettify

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

Not Support Android xml file #195

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.any language is works normally.
2.except android xml files.
(Please include HTML, not just your source code)
<pre class="prettyprint"><!--?xml version="1.0" encoding="utf-8"?--><span 
class="pln">
</span><linearlayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="vertical" android:layout_width="fill_parent" 
android:layout_height="fill_parent"><span class="pln">
    </span><textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This is a 'sans' demo!" android:typeface="sans"><span class="pln">
     </span><textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This is a 'serif' demo!" android:typeface="serif" android:textstyle="italic"><span class="pln">
     </span><textview android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="This is a 'monospace' demo!" android:typeface="monospace" android:textstyle="bold"><span class="pln">
</span></textview></textview></textview></linearlayout>
</pre>

What is the expected output?  What do you see instead?
nothing, it is a blank section with black border.

What version are you using?  On what browser?
Version: prettify-1-Jun-2011.tar.bz2
Brower: Chrome 19.0.1055.1 dev

Please provide any additional information below.

Original issue reported on code.google.com by icyleaf.cn on 1 Mar 2012 at 1:47

Attachments:

GoogleCodeExporter commented 9 years ago
You can't put XML inside a <pre> element and expect it to display properly.  
You need to escape angle brackets.

Instead of

   <pre><xml></pre>

try

   <pre><xml></pre>

or

   <xmp><xml></xmp>

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 2:39