diffDOM
diffDOM copied to clipboard
Problem processing the following html
When I calculate the diff using the following code snippets I run into some trouble, for some reason multiline strings are not handled accordingly. I first calculate the diff and then apply the diff on an empty div.
when I use
<div data-interchange="[/some/link, (default)],
[/some/other/link, (medium)]">
</div>
I get the error
DOMException: Failed to execute 'setAttribute' on 'Element': '(default)],' is not a valid attribute name. and when I use
<div data-interchange="
[/some/link, (default)],
[/some/other/link, (medium)]">
</div>
I get
DOMException: Failed to execute 'setAttribute' on 'Element': '[' is not a valid attribute name.
but when I use
<div data-interchange="[/some/link, (default)], [/some/other/link, (medium)]">
</div>
then I get no error.