maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r771279 - in /maven/doxia/doxia/trunk/doxia-core/src: main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
Date Mon, 04 May 2009 12:05:22 GMT
Author: vsiveton
Date: Mon May  4 12:05:22 2009
New Revision: 771279

URL: http://svn.apache.org/viewvc?rev=771279&view=rev
Log:
o accept several <!ENTITY ...> per line

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java?rev=771279&r1=771278&r2=771279&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java
Mon May  4 12:05:22 2009
@@ -665,6 +665,7 @@
         int entitiesCount = StringUtils.countMatches( text, ENTITY_START );
         if ( entitiesCount > 0 )
         {
+            text = StringUtils.replace( text, ENTITY_START, "\n" + ENTITY_START );
             BufferedReader reader = new BufferedReader( new StringReader( text ) );
             String line;
             String tmpLine = "";

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java?rev=771279&r1=771278&r2=771279&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/parser/XhtmlBaseParserTest.java
Mon May  4 12:05:22 2009
@@ -360,7 +360,7 @@
     public void testEntities()
         throws Exception
     {
-        final String text = "<!DOCTYPE test [<!ENTITY foo \"&#x159;\">\n<!ENTITY
tritPos \"&#x1d7ed;\">]>"
+        final String text = "<!DOCTYPE test [<!ENTITY foo \"&#x159;\"><!ENTITY
tritPos \"&#x1d7ed;\">]>"
                 + "<body><h2>&amp;&foo;</h2><p>&amp;&foo;</p><p>&tritPos;</p></body>";
 
         parser.setValidate( false );



Mime
View raw message