You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using diffLines to compare two versions of a text, would it be possible for each change object to only contain a single line, rather than merging consecutive lines into a single change object?
The text was updated successfully, but these errors were encountered:
newlineIsToken: true to treat newline characters as separate tokens. This allows for changes to the newline structure to occur independently of the line content and to be treated as such. In general this is the more human friendly form of diffLines and diffLines is better suited for patches and other computer friendly output.
No reason for this to be specific to diffLines; it would just as well make sense to have one change object per word in diffWords, or one change object per character in diffChars. And yeah, adding an option for that makes sense to me!
ExplodingCabbage
changed the title
Return a single line per change when comparing lines
Add an option to return one change object per token (e.g. a single line per change object when comparing lines)
Dec 20, 2023
Fix ready to go out in the release after next. (Had to implement this on top of some breaking changes to make it not be a nightmare, which is why it won't be in the next release.)
When using
diffLines
to compare two versions of a text, would it be possible for eachchange
object to only contain a single line, rather than merging consecutive lines into a singlechange
object?The text was updated successfully, but these errors were encountered: