Various fixes for the HTML plugin.

* recreate the converter bean for each file to avoid multiple files causing wierdness to occur on the handling of headings etc

* added more test cases which used to highlight some issues, such as a nested <code> element inside some text markup


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114136 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
jstrachan committed 2003-10-01 10:43:03 +00:00
1 parent aba19dd7ae
commit e06898479c
8 files changed
+107 -21

No files matched your search

@@ -295,8 +295,22 @@ public class Html2XdocBean {
* @param node the node to add
*/
private void addNode(Node node) {
currentNode.add(cloneNode(node));
currentParaNode = null;
if (currentParaNode != null && ! shouldBreakPara(node)) {
currentParaNode.add(cloneNode(node));
}
else {
currentNode.add(cloneNode(node));
currentParaNode = null;
}
}
/**
* @return true if the paragraph should be split, such as for a br or p
* tag
*/
protected boolean shouldBreakPara(Node node) {
String name = node.getName();
return name.equals("p") || name.equals("br");
}
/**