Added more details of recent fixes to the change.xml (thanks for the hint dion :)

Also added another failing test case along with a fix


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jstrachan
2003-10-01 13:20:59 +00:00
parent 5af0968d85
commit ebe30ef486
5 changed files with 42 additions and 11 deletions

View File

@@ -428,16 +428,16 @@ public class Html2XdocBean {
String text = node.getText();
return text.trim().length() <= 0;
}
if (node instanceof Element) {
String name = node.getName();
if (name.equals("p")) {
String text = node.getText();
return text.trim().length() <= 0;
}
if (name.equals("br")) {
return true;
}
}
// if (node instanceof Element) {
// String name = node.getName();
// if (name.equals("p")) {
// String text = node.getText();
// return text.trim().length() <= 0;
// }
// if (name.equals("br")) {
// return true;
// }
// }
return false;
}

View File

@@ -101,6 +101,7 @@ public class TestHtml2Xdoc extends TestCase {
// Test cases
//-------------------------------------------------------------------------
public void testOne() throws Exception {
assertConversion("missingParaBug.html", "missingParaBug.xml");
assertConversion("linkInHeading.html", "linkInHeading.xml");
assertConversion("codeinpara.html", "codeinpara.xml");
assertConversion("input1.html", "output1.xml");

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>A title</title>
</head>
<body>
<h3>Title</h3>
<p class="Pre-requisitelist">
<a href="foo.html">Some Text</a></p>
</body>
</html>

View File

@@ -0,0 +1,11 @@
<document>
<properties>
<title>A title</title>
</properties>
<body>
<section name="Title">
<p class="Pre-requisitelist"><a href="foo.html">Some Text</a>
</p>
</section>
</body>
</document>

View File

@@ -11,7 +11,13 @@
<action dev="dion" type="update">
Only try to find files if the source directory exists
</action>
<!-- JAMES PUT STUFF HERE -->
<action dev="jstrachan" type="update">
Numerous bug fixes have been made. A new HTML converter bean is now used
for every page to avoid contamination across pages. Also various invalid
transformations have been fixed, such as headings containing
either 'span' or 'a' elements, or paragraphs containing just images
or 'a' elements.
</action>
</release>
<release version="1.1" date="2003-09-29">