Warnings were not being detected correctly. Fixed.
ACIP->Unicode uses U+0020, ' ', for whitespace. ACIP->TMW uses the TMW whitespace for whitespace.
This commit is contained in:
parent
01e65176d4
commit
8664571577
2 changed files with 16 additions and 18 deletions
|
@ -367,9 +367,8 @@ public class ACIPConverter {
|
||||||
tdocLocation[0] += text.length();
|
tdocLocation[0] += text.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null != warnings) {
|
|
||||||
if (null != hasWarnings) hasWarnings[0] = true;
|
if (null != hasWarnings) hasWarnings[0] = true;
|
||||||
|
if (null != warnings) {
|
||||||
warnings.append("Warning: Lexical warning: ");
|
warnings.append("Warning: Lexical warning: ");
|
||||||
warnings.append(s.getText());
|
warnings.append(s.getText());
|
||||||
warnings.append('\n');
|
warnings.append('\n');
|
||||||
|
@ -488,8 +487,8 @@ public class ACIPConverter {
|
||||||
tdocLocation[0] += text.length();
|
tdocLocation[0] += text.length();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (null != warnings) {
|
|
||||||
if (null != hasWarnings) hasWarnings[0] = true;
|
if (null != hasWarnings) hasWarnings[0] = true;
|
||||||
|
if (null != warnings) {
|
||||||
warnings.append(warning);
|
warnings.append(warning);
|
||||||
warnings.append('\n');
|
warnings.append('\n');
|
||||||
}
|
}
|
||||||
|
@ -563,16 +562,15 @@ public class ACIPConverter {
|
||||||
// one) and then a comma:
|
// one) and then a comma:
|
||||||
peekaheadFindsSpacesAndComma(scan, i+1))) {
|
peekaheadFindsSpacesAndComma(scan, i+1))) {
|
||||||
if (null != writer) {
|
if (null != writer) {
|
||||||
unicode = " ";
|
unicode = " "; // DLC NOW FIXME: allow for U+00A0 between two <i>shad</i>s (0F0D or 0F0E), and optionally insert a U+200B after the <i>shad</i> following the whitespace so that stupid software will break lines more nicely
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
if (null != tdoc) {
|
if (null != tdoc) {
|
||||||
String x = " ";
|
DuffCode spaceDuff = TibetanMachineWeb.getGlyph("_");
|
||||||
tdoc.appendRoman(tdocLocation[0],
|
if (null == spaceDuff) throw new Error("whitespace duff");
|
||||||
x,
|
tdoc.appendDuffCode(tdocLocation[0]++,
|
||||||
Color.BLACK);
|
spaceDuff, Color.BLACK);
|
||||||
tdocLocation[0] += x.length();
|
continue; // FIXME: if null != writer, output was just dropped.
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (s.getText().equals(",")
|
} else if (s.getText().equals(",")
|
||||||
|
|
Loading…
Reference in a new issue