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
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,10 +202,21 @@ dd = new diffDOM.DiffDOM({
202
202
#### Disable value diff detection
203
203
204
204
For forms that have been filled out by a user in ways that have changed which value is associated with an input field or which options are checked/selected without
205
-
the DOM having been updated, the values are diffed. For use cases in which no changes have been made to any of the form values, one may choose to skip diffing the values. To do this, hand `false` as a third configuration option to diffDOM:
205
+
the DOM having been updated, the values are diffed. For use cases in which no changes have been made to any of the form values, one may choose to skip diffing the values. To do this, set `valueDiffing` to `false` as a configuration option to diffDOM:
206
206
207
207
```js
208
208
dd =newdiffDOM.DiffDOM({
209
209
valueDiffing:false,
210
210
})
211
211
```
212
+
213
+
#### Interprete strings as case caseSensitive
214
+
215
+
Strings of HTML can normally be interpreted case-insensitively as HTML tags don't differentiate between uppercase and lowercase. However, in the case of XML (SVGs, XHTML) there is a difference and this should be enabled. To do this, set `caseSensitive` to `true` as a configuration option to diffDOM:
Copy file name to clipboardExpand all lines: src/diffDOM/types.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ interface DiffDOMOptions {
105
105
maxDepth: number|false// False or a numeral. If set to a numeral, limits the level of depth that the the diff mechanism looks for differences. If false, goes through the entire tree.
106
106
maxChildCount: number// False or a numeral. If set to a numeral, only does a simplified form of diffing of contents so that the number of diffs cannot be higher than the number of child nodes.
107
107
valueDiffing: boolean// Whether to take into consideration the values of forms that differ from auto assigned values (when a user fills out a form).
108
+
caseSensitive: boolean// Whether to preserve the case of an input string. Important when including CML (XHTML, SVG, etc.)
108
109
// syntax: textDiff: function (node, currentValue, expectedValue, newValue)
0 commit comments