Commit 510d9627 authored by Neil Fraser's avatar Neil Fraser

Improve a couple of XML literal strings.

parent 8beffc6c
......@@ -20,22 +20,22 @@
'use strict';
var XML_TEXT = ['<xml xmlns="http://www.w3.org/1999/xhtml">',
' <block type="controls_repeat_ext" id="10" inline="true" x="21" y="23">',
' <block type="controls_repeat_ext" inline="true" x="21" y="23">',
' <value name="TIMES">',
' <block type="math_number" id="11">',
' <block type="math_number">',
' <field name="NUM">10</field>',
' </block>',
' </value>',
' <statement name="DO">',
' <block type="variables_set" id="139" inline="true">',
' <block type="variables_set" inline="true">',
' <field name="VAR">item</field>',
' <value name="VALUE">',
' <block type="lists_create_empty" id="171"></block>',
' <block type="lists_create_empty"></block>',
' </value>',
' <next>',
' <block type="text_print" id="78" inline="false">',
' <block type="text_print" inline="false">',
' <value name="TEXT">',
' <block type="text" id="189">',
' <block type="text">',
' <field name="TEXT">Hello</field>',
' </block>',
' </value>',
......@@ -44,7 +44,7 @@ var XML_TEXT = ['<xml xmlns="http://www.w3.org/1999/xhtml">',
' </block>',
' </statement>',
' </block>',
'</xml>'].join('/n');
'</xml>'].join('\n');
function test_textToDom() {
var dom = Blockly.Xml.textToDom(XML_TEXT);
......
......@@ -147,34 +147,34 @@ function spaghetti(n) {
console.timeEnd('Spaghetti domToWorkspace');
}
var spaghettiXml = [
' <block type="controls_if" inline="false" x="30" y="30">' +
' <value name="IF0">' +
' <block type="logic_compare" inline="true">' +
' <field name="OP">EQ</field>' +
' <value name="A">' +
' <block type="math_arithmetic" inline="true">' +
' <field name="OP">MULTIPLY</field>' +
' <value name="A">' +
' <block type="math_number">' +
' <field name="NUM">6</field>' +
' </block>' +
' </value>' +
' <value name="B">' +
' <block type="math_number">' +
' <field name="NUM">7</field>' +
' </block>' +
' </value>' +
' </block>' +
' </value>' +
' <value name="B">' +
' <block type="math_number">' +
' <field name="NUM">42</field>' +
' </block>' +
' </value>' +
' </block>' +
' </value>' +
' <statement name="DO0"></statement>' +
' <next></next>' +
' <block type="controls_if">',
' <value name="IF0">',
' <block type="logic_compare">',
' <field name="OP">EQ</field>',
' <value name="A">',
' <block type="math_arithmetic">',
' <field name="OP">MULTIPLY</field>',
' <value name="A">',
' <block type="math_number">',
' <field name="NUM">6</field>',
' </block>',
' </value>',
' <value name="B">',
' <block type="math_number">',
' <field name="NUM">7</field>',
' </block>',
' </value>',
' </block>',
' </value>',
' <value name="B">',
' <block type="math_number">',
' <field name="NUM">42</field>',
' </block>',
' </value>',
' </block>',
' </value>',
' <statement name="DO0"></statement>',
' <next></next>',
' </block>'].join('\n');
</script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment