diff --git a/packages/marko/src/runtime/components/beginComponent.js b/packages/marko/src/runtime/components/beginComponent.js index beb9eba49c..b393edb750 100644 --- a/packages/marko/src/runtime/components/beginComponent.js +++ b/packages/marko/src/runtime/components/beginComponent.js @@ -54,7 +54,7 @@ module.exports = function beginComponent( if ((ownerIsRenderBoundary || ownerWillRerender) && key != null) { out.w( - "" + "-->" ); } else { - out.w(""); + out.w(""); } return componentDef; diff --git a/packages/marko/src/runtime/components/endComponent.js b/packages/marko/src/runtime/components/endComponent.js index 56025bd6ac..8296cc1e9b 100644 --- a/packages/marko/src/runtime/components/endComponent.js +++ b/packages/marko/src/runtime/components/endComponent.js @@ -5,7 +5,7 @@ var getComponentsContext = ComponentsContext.___getComponentsContext; module.exports = function endComponent(out, componentDef) { if (componentDef.___renderBoundary) { - out.w(""); + out.w(""); getComponentsContext(out).___isPreserved = componentDef.___parentPreserved; } }; diff --git a/packages/marko/src/runtime/html/AsyncStream.js b/packages/marko/src/runtime/html/AsyncStream.js index ce98d6a283..286028f46f 100644 --- a/packages/marko/src/runtime/html/AsyncStream.js +++ b/packages/marko/src/runtime/html/AsyncStream.js @@ -571,7 +571,7 @@ var proto = (AsyncStream.prototype = { ___beginFragment: function(key, component, preserve) { if (preserve) { - this.write(""); + this.write(""); } if (this._elStack) { this._elStack.push(preserve); @@ -583,7 +583,7 @@ var proto = (AsyncStream.prototype = { ___endFragment: function() { var preserve = this._elStack.pop(); if (preserve) { - this.write(""); + this.write(""); } }, diff --git a/packages/marko/src/runtime/html/helpers/attr.js b/packages/marko/src/runtime/html/helpers/attr.js index b7856819c6..47278873f8 100644 --- a/packages/marko/src/runtime/html/helpers/attr.js +++ b/packages/marko/src/runtime/html/helpers/attr.js @@ -62,5 +62,5 @@ function guessQuotes(value) { } } - return value && "=" + value; + return value && "=" + (value[len - 1] === "/" ? value + " " : value); } diff --git a/packages/marko/test/render/fixtures/attr-unquoted/expected.html b/packages/marko/test/render/fixtures/attr-unquoted/expected.html new file mode 100644 index 0000000000..e9f48cf7e3 --- /dev/null +++ b/packages/marko/test/render/fixtures/attr-unquoted/expected.html @@ -0,0 +1,2 @@ +
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/attr-unquoted/template.marko b/packages/marko/test/render/fixtures/attr-unquoted/template.marko new file mode 100644 index 0000000000..460fcf2450 --- /dev/null +++ b/packages/marko/test/render/fixtures/attr-unquoted/template.marko @@ -0,0 +1,14 @@ +
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/attr-unquoted/test.js b/packages/marko/test/render/fixtures/attr-unquoted/test.js new file mode 100644 index 0000000000..c4013b3447 --- /dev/null +++ b/packages/marko/test/render/fixtures/attr-unquoted/test.js @@ -0,0 +1 @@ +exports.templateData = {}; diff --git a/packages/marko/test/render/fixtures/attr-unquoted/vdom-expected.html b/packages/marko/test/render/fixtures/attr-unquoted/vdom-expected.html new file mode 100644 index 0000000000..98c918726d --- /dev/null +++ b/packages/marko/test/render/fixtures/attr-unquoted/vdom-expected.html @@ -0,0 +1,2 @@ +
diff --git a/packages/marko/test/render/fixtures/component-aria-key/expected.html b/packages/marko/test/render/fixtures/component-aria-key/expected.html index ee0c4bb507..2ab2e0a79e 100644 --- a/packages/marko/test/render/fixtures/component-aria-key/expected.html +++ b/packages/marko/test/render/fixtures/component-aria-key/expected.html @@ -1 +1 @@ -
Submit the form thing
\ No newline at end of file +
Submit the form thing
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/component-file-export-class/expected.html b/packages/marko/test/render/fixtures/component-file-export-class/expected.html index 4860619b97..22d361194f 100644 --- a/packages/marko/test/render/fixtures/component-file-export-class/expected.html +++ b/packages/marko/test/render/fixtures/component-file-export-class/expected.html @@ -1 +1 @@ -
Hello Frank!
\ No newline at end of file +
Hello Frank!
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/component-label-for/expected.html b/packages/marko/test/render/fixtures/component-label-for/expected.html index 6e10fc96aa..e5ad8636a6 100644 --- a/packages/marko/test/render/fixtures/component-label-for/expected.html +++ b/packages/marko/test/render/fixtures/component-label-for/expected.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/marko/test/render/fixtures/component-safe-json/expected.html b/packages/marko/test/render/fixtures/component-safe-json/expected.html index 321f383c06..9c0ff10399 100644 --- a/packages/marko/test/render/fixtures/component-safe-json/expected.html +++ b/packages/marko/test/render/fixtures/component-safe-json/expected.html @@ -1 +1 @@ -Hello \ No newline at end of file +Hello \ No newline at end of file diff --git a/packages/marko/test/render/fixtures/components-await-beginAsync/expected.html b/packages/marko/test/render/fixtures/components-await-beginAsync/expected.html index 34156dd703..3bbaff5036 100644 --- a/packages/marko/test/render/fixtures/components-await-beginAsync/expected.html +++ b/packages/marko/test/render/fixtures/components-await-beginAsync/expected.html @@ -1 +1 @@ -
Hello inner-inner
Hello inner
Hello outer
\ No newline at end of file +
Hello inner-inner
Hello inner
Hello outer
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/components-await-title/expected.html b/packages/marko/test/render/fixtures/components-await-title/expected.html index e30554cbca..3d4e1b9ea0 100644 --- a/packages/marko/test/render/fixtures/components-await-title/expected.html +++ b/packages/marko/test/render/fixtures/components-await-title/expected.html @@ -1 +1 @@ -<!--FLUSH-->Welcome Frank
Hello
\ No newline at end of file +<!--FLUSH-->Welcome Frank
Hello
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/components-await/expected.html b/packages/marko/test/render/fixtures/components-await/expected.html index e6cfb9fec5..4e84ff0770 100644 --- a/packages/marko/test/render/fixtures/components-await/expected.html +++ b/packages/marko/test/render/fixtures/components-await/expected.html @@ -1 +1 @@ -
Hello inner-inner
Hello inner
Hello outer
\ No newline at end of file +
Hello inner-inner
Hello inner
Hello outer
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/components/expected.html b/packages/marko/test/render/fixtures/components/expected.html index 07737571ba..9f2b773b69 100644 --- a/packages/marko/test/render/fixtures/components/expected.html +++ b/packages/marko/test/render/fixtures/components/expected.html @@ -1 +1 @@ -Components

foo1

bar1

bar2

foo-split1

split-child1

split-child2

foo-split2

split-child1

split-child2

foo2

bar1

bar2

foo-split1

split-child1

split-child2

foo-split2

split-child1

split-child2

split1

split-child1

split-child2

split2

split-child1

split-child2

\ No newline at end of file +Components

foo1

bar1

bar2

foo-split1

split-child1

split-child2

foo-split2

split-child1

split-child2

foo2

bar1

bar2

foo-split1

split-child1

split-child2

foo-split2

split-child1

split-child2

split1

split-child1

split-child2

split2

split-child1

split-child2

\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/dynamic-split-component/expected.html b/packages/marko/test/render/fixtures/dynamic-split-component/expected.html index 0d6f5401ac..4f0d4972be 100644 --- a/packages/marko/test/render/fixtures/dynamic-split-component/expected.html +++ b/packages/marko/test/render/fixtures/dynamic-split-component/expected.html @@ -1 +1 @@ -
Body data
Body data
\ No newline at end of file +
Body data
Body data
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/dynamic-tag-arguments/expected.html b/packages/marko/test/render/fixtures/dynamic-tag-arguments/expected.html index b15e3c9e71..5cf81ce4b4 100644 --- a/packages/marko/test/render/fixtures/dynamic-tag-arguments/expected.html +++ b/packages/marko/test/render/fixtures/dynamic-tag-arguments/expected.html @@ -1 +1 @@ -testPage http://ebay.com
\ No newline at end of file +testPage http://ebay.com
\ No newline at end of file diff --git a/packages/marko/test/render/fixtures/global-runtime-id/expected.html b/packages/marko/test/render/fixtures/global-runtime-id/expected.html index 895936a288..7e37ecba4f 100644 --- a/packages/marko/test/render/fixtures/global-runtime-id/expected.html +++ b/packages/marko/test/render/fixtures/global-runtime-id/expected.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file