platform-bible-utils
    Preparing search index...

    Function areUsjContentsEqualExceptWhitespace

    • Determines if the USJ documents or markers (and all contents) are equivalent after regularizing spaces according to the way ParatextData.dll does.

      Note that this will not work properly if there ever exist any properties of USJ document or USJ markers other than content that are complex objects like arrays or objects as the properties are shallow equaled.

      Parameters

      • a: undefined | Usj
      • b: undefined | Usj
      • Optionaloptions: { ignoreDirectionMarks?: boolean }

        ignoreDirectionMarks: also treat text that differs only by left-to-right (U+200E) or right-to-left (U+200F) marks as equal, as Paratext 9 does when deciding whether a save changed anything. Off by default because a sync that adopts incoming text must still see an added direction mark.

      Returns boolean