You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2004/07/25 23:01:09 UTC
[jira] Closed: (MPHTMLXDOC-1) the whitespace detector in the html2xdoc plugin is too loose.
Message:
The following issue has been closed.
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MPHTMLXDOC-1
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MPHTMLXDOC-1
Summary: the whitespace detector in the html2xdoc plugin is too loose.
Type: Bug
Status: Closed
Priority: Major
Resolution: CANNOT REPRODUCE
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven-html2xdoc-plugin
Assignee:
Reporter:
Created: Tue, 19 Aug 2003 8:27 PM
Updated: Sun, 25 Jul 2004 5:00 PM
Environment: windows
Description:
In an html document w/ the following construct,
<p><font face="Courier New">SQL></font></p>
the method Html2XdocBean.isWhiteSpace() returns true.
The following change would prevent this:
protected boolean isWhitespace(Node node) {
if (node instanceof CharacterData) {
String text = node.getText();
return text.trim().length() <= 0;
}
if (node instanceof Element) {
String name = node.getName();
if (name.equals("p")) {
// Add this test
if (((Element)node).isTextOnly()) {
String text = node.getText();
return text.trim().length() <= 0;
}
}
if (name.equals("br")) {
return true;
}
}
return false;
}
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org