diff --git a/core/modules/utils/fakedom.js b/core/modules/utils/fakedom.js index 5b3502f46..9d0745da9 100755 --- a/core/modules/utils/fakedom.js +++ b/core/modules/utils/fakedom.js @@ -112,7 +112,7 @@ Object.defineProperty(TW_Element.prototype, "outerHTML", { } } } - output.push(">\n"); + output.push(">"); if($tw.config.htmlVoidElements.indexOf(this.tag) === -1) { output.push(this.innerHTML); output.push(""); diff --git a/editions/test/tiddlers/tests/test-widget.js b/editions/test/tiddlers/tests/test-widget.js index 890fb369c..938c9ad7b 100755 --- a/editions/test/tiddlers/tests/test-widget.js +++ b/editions/test/tiddlers/tests/test-widget.js @@ -70,7 +70,7 @@ describe("Widget module", function() { var wrapper = renderWidgetNode(widgetNode); describe("should render", function() { // Test the rendering - expect(wrapper.innerHTML).toBe("A text node
\n and the content of a DIV
\n and an inner DIV
and back in the outer DIV
"); + expect(wrapper.innerHTML).toBe("A text node
and the content of a DIV
and an inner DIV
and back in the outer DIV
"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -114,7 +114,7 @@ describe("Widget module", function() { var wrapper = renderWidgetNode(widgetNode); describe("should render", function() { // Test the rendering - expect(wrapper.innerHTML).toBe("A text node
\n and the content of a DIV
\n and an inner DIV
and back in the outer DIVthe quick brown fox
the quick brown fox"); + expect(wrapper.innerHTML).toBe("A text node
and the content of a DIV
and an inner DIV
and back in the outer DIVthe quick brown fox
the quick brown fox"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -132,7 +132,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerOne"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("A text node
\n and the content of a DIV
\n and an inner DIV
and back in the outer DIVjumps over the lazy dog
jumps over the lazy dog"); + expect(wrapper.innerHTML).toBe("A text node
and the content of a DIV
and an inner DIV
and back in the outer DIVjumps over the lazy dog
jumps over the lazy dog"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -177,7 +177,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("\n\n\n"); + expect(wrapper.innerHTML).toBe("\n"); expect(wrapper.firstChild.namespaceURI).toBe("http://www.w3.org/2000/svg"); }); @@ -195,7 +195,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nMy Jolly Old World is Jolly

"); + expect(wrapper.innerHTML).toBe("

My Jolly Old World is Jolly

"); }); it("should render the view widget", function() { @@ -210,7 +210,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nJolly Old World

"); + expect(wrapper.innerHTML).toBe("

Jolly Old World

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -221,7 +221,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerOne"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nWorld-wide Jelly

"); + expect(wrapper.innerHTML).toBe("

World-wide Jelly

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -244,14 +244,14 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nMy Jolly Old World is Jolly

"); + expect(wrapper.innerHTML).toBe("

My Jolly Old World is Jolly

"); // Change the transcluded tiddler wiki.addTiddler({title: "TiddlerFour", text: "TiddlerOne"}); // Refresh refreshWidgetNode(widgetNode,wrapper,["TiddlerFour"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nMy Jolly Old World is Jolly

"); + expect(wrapper.innerHTML).toBe("

My Jolly Old World is Jolly

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -279,7 +279,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\n

\nContent

"); + expect(wrapper.innerHTML).toBe("

Content

"); }); it("should deal with built-in macros", function() { @@ -294,7 +294,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\n\nMy linky link

"); + expect(wrapper.innerHTML).toBe("

My linky link

"); }); it("should deal with the list widget", function() { @@ -312,14 +312,14 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); // Add another tiddler wiki.addTiddler({title: "TiddlerFive", text: "Jalapeno Peppers"}); // Refresh refreshWidgetNode(widgetNode,wrapper,["TiddlerFive"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -335,7 +335,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerThree"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerTwo

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -350,7 +350,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerThree"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -377,7 +377,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); + expect(wrapper.innerHTML).toBe("

TiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); // Check the next siblings of each of the list elements var listWidget = widgetNode.children[0].children[0]; // Add another tiddler @@ -386,7 +386,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerFive"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -402,7 +402,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerThree"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerTwoSomething

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerTwoSomething

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -417,7 +417,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerThree"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoSomething

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -433,7 +433,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["YetAnotherTiddler"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nTiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoYetAnotherTiddlerSomething

"); + expect(wrapper.innerHTML).toBe("

TiddlerFiveTiddlerFourTiddlerOneTiddlerThreeTiddlerTwoYetAnotherTiddlerSomething

"); // Test the sequence numbers in the DOM expect(wrapper.sequenceNumber).toBe(0); expect(wrapper.children[0].sequenceNumber).toBe(1); @@ -461,7 +461,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); }); it("should deal with the list widget and empty lists", function() { @@ -472,7 +472,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nnothing

"); + expect(wrapper.innerHTML).toBe("

nothing

"); }); it("should refresh lists that become empty", function() { @@ -490,7 +490,7 @@ describe("Widget module", function() { // Render the widget node to the DOM var wrapper = renderWidgetNode(widgetNode); // Test the rendering - expect(wrapper.innerHTML).toBe("

\nTiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); + expect(wrapper.innerHTML).toBe("

TiddlerFourTiddlerOneTiddlerThreeTiddlerTwo

"); // Get rid of the tiddlers wiki.deleteTiddler("TiddlerOne"); wiki.deleteTiddler("TiddlerTwo"); @@ -500,7 +500,7 @@ describe("Widget module", function() { refreshWidgetNode(widgetNode,wrapper,["TiddlerOne","TiddlerTwo","TiddlerThree","TiddlerFour"]); describe("should refresh", function() { // Test the refreshing - expect(wrapper.innerHTML).toBe("

\nnothing

"); + expect(wrapper.innerHTML).toBe("

nothing

"); }); }); diff --git a/editions/test/tiddlers/tests/test-wikitext.js b/editions/test/tiddlers/tests/test-wikitext.js index dcd13f314..dd836a61a 100644 --- a/editions/test/tiddlers/tests/test-wikitext.js +++ b/editions/test/tiddlers/tests/test-wikitext.js @@ -34,16 +34,16 @@ describe("WikiText tests", function() { }); it("should render plain text tiddlers as a paragraph", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerOne")).toBe("

\nThe quick brown fox

"); + expect(wiki.new_renderTiddler("text/html","TiddlerOne")).toBe("

The quick brown fox

"); }); it("should preserve single new lines", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerTwo")).toBe("

\nThe rain in Spain\nfalls mainly on the plain

"); + expect(wiki.new_renderTiddler("text/html","TiddlerTwo")).toBe("

The rain in Spain\nfalls mainly on the plain

"); }); it("should use double new lines to create paragraphs", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerThree")).toBe("

\nThe speed of sound

\nThe light of speed

"); + expect(wiki.new_renderTiddler("text/html","TiddlerThree")).toBe("

The speed of sound

The light of speed

"); }); it("should support attributes specified as macro invocations", function() { - expect(wiki.new_renderTiddler("text/html","TiddlerFour")).toBe("

\n\nThis is a link

"); + expect(wiki.new_renderTiddler("text/html","TiddlerFour")).toBe("

This is a link

"); }); });