Hi! I noticed what appears to be a type inconsistency in the buildLinearOrder function that might cause issues. I wanted to bring this to your attention in case it's unintentional.
From what I can see, spacesRangeStart is destructured as a number from the array returned by getDelimiterPos (line 167):
const spacesRangeFont = node.getRangeFontName(
spacesRangeStart,
spacesRangeStart[0] // This might be causing an issue
) as FontName
However, the code tries to access spacesRangeStart[0] as if it were an array, which might not work as expected, or if I've misunderstood the code's intention.
Thanks