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