diff --git a/www/assert/hyperjson.js b/www/assert/hyperjson.js index 90edb0616..9a363bb79 100644 --- a/www/assert/hyperjson.js +++ b/www/assert/hyperjson.js @@ -24,7 +24,8 @@ define([], function () { return callOnHyperJSON(child, cb); } else if (typeof (child) === 'string') { // string nodes have leading and trailing quotes - return child.replace(/(^"|"$)/g,""); + // don't strip them! + return child; //child.replace(/(^"|"$)/g,""); } else { // the above branches should cover all methods // if we hit this, there is a problem diff --git a/www/assert/index.html b/www/assert/index.html index 68c995f68..e271750f5 100644 --- a/www/assert/index.html +++ b/www/assert/index.html @@ -32,12 +32,17 @@

pewpewpew

+

Test 1

+

paragraph text

+ +

"pewpewpew"

+

Test 2

XWiki Macros

-

Here is a macro

+

Here is a macro


diff --git a/www/assert/main.js b/www/assert/main.js index 0ffea44e6..c215cf28e 100644 --- a/www/assert/main.js +++ b/www/assert/main.js @@ -46,14 +46,15 @@ define([ var success = cloned.outerHTML === target.outerHTML; if (!success) { + var op = TextPatcher.diff(target.outerHTML, cloned.outerHTML); window.DEBUG = { error: "Expected equality between A and B", A: target.outerHTML, B: cloned.outerHTML, - target: target, - diff: TextPatcher.diff(target.outerHTML, cloned.outerHTML) + diff: op }; console.log(JSON.stringify(window.DEBUG, null, 2)); + TextPatcher.log(op); } return success; @@ -62,6 +63,7 @@ define([ [ '#target', '#widget', + '#quot', ].forEach(function (sel) { roundTrip($(sel)[0]); });