Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#74 Sequence of bold and italic tags

open
nobody
None
5
2005-10-06
2005-10-06
Anonymous
No

Rasmus Hansen, dynastit@hotmail.com

The chosen sequence is i b followed by /b /i (obviously).
At font changes this might mess up though and become
b - i ... /b /i. It might be ok for html, but not for xml.

*** HtmlOutputDev.cc.orig Thu Oct 6 14:38:55 2005
--- HtmlOutputDev.cc Thu Oct 6 14:32:41 2005
***************
*** 496,503 ****
if( hfont1->isItalic() && !hfont2->isItalic() )
str1->htext->append("</i>", 4);
- if( !hfont1->isBold() && hfont2->isBold() )
- str1->htext->append("<b>", 3);
if( !hfont1->isItalic() && hfont2->isItalic() )
str1->htext->append("<i>", 3);

/* now handle switch of links */
--- 496,503 ----
if( hfont1->isItalic() && !hfont2->isItalic() )
str1->htext->append("</i>", 4);
if( !hfont1->isItalic() && hfont2->isItalic() )
str1->htext->append("<i>", 3);
+ if( !hfont1->isBold() && hfont2->isBold() )
+ str1->htext->append("<b>", 3);

/* now handle switch of links */

Discussion