|
|
|
@ -228,7 +228,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
|
|
|
|
|
if (tag.equals(HtmlTags.ANCHOR)) { |
|
|
|
|
cprops.addToChain(tag, h); |
|
|
|
|
if (currentParagraph == null) { |
|
|
|
|
currentParagraph = new Paragraph(); |
|
|
|
|
currentParagraph = FactoryProperties |
|
|
|
|
.createParagraph(cprops); |
|
|
|
|
} |
|
|
|
|
stack.push(currentParagraph); |
|
|
|
|
currentParagraph = new Paragraph(); |
|
|
|
@ -236,7 +237,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
|
|
|
|
|
} |
|
|
|
|
if (tag.equals(HtmlTags.NEWLINE)) { |
|
|
|
|
if (currentParagraph == null) { |
|
|
|
|
currentParagraph = new Paragraph(); |
|
|
|
|
currentParagraph = FactoryProperties |
|
|
|
|
.createParagraph(cprops); |
|
|
|
|
} |
|
|
|
|
currentParagraph.add(factoryProperties |
|
|
|
|
.createChunk("\n", cprops)); |
|
|
|
@ -249,7 +251,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
|
|
|
|
|
// end with a break, but a trailing break is always inserted.
|
|
|
|
|
boolean addLeadingBreak = true; |
|
|
|
|
if (currentParagraph == null) { |
|
|
|
|
currentParagraph = new Paragraph(); |
|
|
|
|
currentParagraph = FactoryProperties |
|
|
|
|
.createParagraph(cprops); |
|
|
|
|
addLeadingBreak = false; |
|
|
|
|
} |
|
|
|
|
if (addLeadingBreak) { // Not a new paragraph
|
|
|
|
@ -545,7 +548,8 @@ public class HTMLWorker implements SimpleXMLDocHandler, DocListener {
|
|
|
|
|
} |
|
|
|
|
if (tag.equals("a")) { |
|
|
|
|
if (currentParagraph == null) { |
|
|
|
|
currentParagraph = new Paragraph(); |
|
|
|
|
currentParagraph = FactoryProperties |
|
|
|
|
.createParagraph(cprops); |
|
|
|
|
} |
|
|
|
|
boolean skip = false; |
|
|
|
|
if (interfaceProps != null) { |
|
|
|
|