Skip to content

Added support for atomic tags; ignore tag attributes; interpret whitespace; pass in wrapper class name#4

Open
keanulee wants to merge 7 commits intotnwinc:masterfrom
keanulee:tnwinc-changes
Open

Added support for atomic tags; ignore tag attributes; interpret whitespace; pass in wrapper class name#4
keanulee wants to merge 7 commits intotnwinc:masterfrom
keanulee:tnwinc-changes

Conversation

@keanulee
Copy link

A few changes that made this library useful for us. Here are the changes:

  • Atomic tags - Tags such as <math> and <svg> tags do not support <ins> and <del> tags as children. So during the tokenization step, we consider these tags as a single token.
  • Ignore tag attributes - When running the diff, we ignore changes in tag attributes. When two tags are considered equivalent, we output the tag from the after list of tokens.
  • Interpret whitespace - Collapse adjacent whitespace (as adjacent whitespace is meaningless in HTML, except for <pre> tags - a case this does NOT handle), and then convert non-breaking whitespace to regular spaces (e.g. '&nbsp;' == ' ').
  • Wrapper class name - allows an arbitrary class name to be included in the <ins> and <del> tags.
  • Tests - To support all these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant