TonyXT / google-code-prettify

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

XML tag names can contain : #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi
I was playing with the prettify and unnoticed than xml tag names
with : are not displayed correctly. (i.e. for xml with
xml namespaces), the following simple patch fixes this
problem:
--- prettify.js 2007-09-07 09:28:35.000000000 +0100
+++ orig/prettify.js    2007-08-31 03:21:54.000000000 +0100
@@ -618,7 +618,7 @@
     [PR_ATTRIB_VALUE, /^\"[^\"]*(?:\"|$)/, null, '"'],
     [PR_PUNCTUATION,  /^[<>\/=]+/, null, '<>/=']
     ], [
-    [PR_TAG,          /^[\w-:]+/, /^</],
+    [PR_TAG,          /^[\w-]+/, /^</],
     [PR_ATTRIB_VALUE, /^[\w-]+/, /^=/], 
     [PR_ATTRIB_NAME,  /^[\w-]+/, null], 
     [PR_PLAIN,        /^\s+/, null, ' \r\n']

Original issue reported on code.google.com by peter.ki...@gmail.com on 7 Sep 2007 at 8:29

GoogleCodeExporter commented 8 years ago
Fixed in revision 34

Original comment by mikesamuel@gmail.com on 19 Sep 2007 at 4:21

GoogleCodeExporter commented 8 years ago

Original comment by mikesamuel@gmail.com on 19 Sep 2007 at 4:21