relax reconstruction error criteria (#959)
Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
This commit is contained in:
parent
af1561b49f
commit
2ddd07791d
2 changed files with 4 additions and 2 deletions
|
|
@ -116,8 +116,10 @@ class Choreographer {
|
|||
// we've got a rather elaborate method of updating tokens after matches are accepted
|
||||
// so we need to check if the reconstructed text matches the current text
|
||||
// if not, let's get the tokens again and log an error
|
||||
final reconstructedText =
|
||||
PangeaToken.reconstructText(igc.igcTextData!.tokens);
|
||||
if (igc.igcTextData?.tokens != null &&
|
||||
PangeaToken.reconstructText(igc.igcTextData!.tokens) != currentText) {
|
||||
reconstructedText.trim() != currentText.trim()) {
|
||||
if (kDebugMode) {
|
||||
PangeaToken.reconstructText(
|
||||
igc.igcTextData!.tokens,
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class IGCTextData {
|
|||
newTokens.replaceRange(startIndex, endIndex, replacement.tokens);
|
||||
|
||||
final String newFullText = PangeaToken.reconstructText(newTokens);
|
||||
if (newFullText != originalInput && kDebugMode) {
|
||||
if (newFullText.trim() != originalInput.trim() && kDebugMode) {
|
||||
PangeaToken.reconstructText(newTokens, debugWalkThrough: true);
|
||||
ErrorHandler.logError(
|
||||
m: "reconstructed text not working",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue