kamalchopra / jsyntaxpane

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

XML syntax coloring fails on backslash in attributes. #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
-What steps will reproduce the problem?
Create an EditorPane and set the SyntaxKit as EditorKit. 
The coloring should be for XML.

editorPane = new JEditorPane();
editorPane.setEditorKit(new SyntaxKit("xml"));

- What is the expected output? What do you see instead?
As seen in the attached picture, whenever there is a backslash in an
attribute value the coloring bails out. See the path attribute for example.

  <subst drive="x:" path="O:cs40_fds_emafra" /> <!-- Colored correctly -->
  <subst drive="x:" path="O:\cs40_fds_substance" /> <!-- incorrect -->
  <subst drive="x:" path="O:\\cs40_0_sdp_ec_emafra" /> <!-- incorrect -->

What version of the product are you using? On what operating system?
I'm using the 080629a version on windows 2000 / JDK 1.6.0

regards

/frans

Original issue reported on code.google.com by frans.ma...@gmail.com on 1 Jul 2008 at 8:03

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report.  Problem verified.  I've fixed the Java / GroovyString 
escape
sequences, but missed XML.  Will be fixed shortly.

Ayman

Original comment by ayman.al...@gmail.com on 1 Jul 2008 at 9:32

GoogleCodeExporter commented 9 years ago
Fixed in Release 080701a.
Also fixed the single quote for attribute values, and added highlighting for XML
escape chars like {{{<}}} if it's *not* in a quoted string.  
With the current implementation, it is very hard to have tokens within tokens.  
If
there is demand, I'll work on that.  See issue 6;

Original comment by ayman.al...@gmail.com on 1 Jul 2008 at 10:00