[sword-devel] OSIS bold tag handling problem
Karl Kleinpaste
karl at kleinpaste.org
Tue Aug 11 17:30:31 MST 2009
We got a report that a module under development using <hi type="bold">
was displaying in Xiphos using italics instead. But it's OK in
BibleDesktop and BibleTime.
I found this in src/modules/filters/osishtmlhref.cpp:
else if (!strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "b" || type == "x-b") {
outText("<b>", buf, u);
u->inBold = true;
}
else { // all other types
outText("<i>", buf, u);
u->inBold = false;
}
}
So nothing but "b" and "x-b" is accepted; everything else falls into the
italics case. Another person says this is a bug, that the set of <hi>
type variants is
acrostic bold emphasis illuminated italic line-through
normal small-caps sub super underline
So, two questions:
- Is it true that the code is bugged?
- If so, and we fix the code, how many existing modules that currently
use "b" and "x-b" will be broken, and/or is it reasonable to leave
"b" and "x-b" as acceptable alternate use cases?
More information about the sword-devel
mailing list