exports[`test attr-es2015.pug 1`] = ` Array [ Object { "buffer": false, "col": 1, "line": 1, "mustEscape": false, "type": "code", "val": "var avatar = \'219b77f9d21de75e81851b6b886057c7\'", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "div", }, Object { "col": 4, "line": 3, "type": "class", "val": "avatar-div", }, Object { "col": 15, "line": 3, "type": "start-attributes", }, Object { "col": 16, "line": 3, "mustEscape": true, "name": "style", "type": "attribute", "val": "\`background-image: url(https://www.gravatar.com/avatar/\${avatar})\`", }, Object { "col": 88, "line": 3, "type": "end-attributes", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 1, "line": 4, "type": "eos", }, ] `; exports[`test attribute-invalid-expression.pug 1`] = ` Object { "code": "PUG:SYNTAX_ERROR", "column": 5, "line": 2, "msg": "Syntax Error: Unterminated string constant", } `; exports[`test attrs.js.pug 1`] = ` Array [ Object { "buffer": false, "col": 1, "line": 1, "mustEscape": false, "type": "code", "val": "var id = 5", }, Object { "col": 1, "line": 2, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 2, "mustEscape": false, "type": "code", "val": "function answer() { return 42; }", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "a", }, Object { "col": 2, "line": 3, "type": "start-attributes", }, Object { "col": 3, "line": 3, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/user/\' + id", }, Object { "col": 23, "line": 3, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'button\'", }, Object { "col": 37, "line": 3, "type": "end-attributes", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 1, "line": 4, "type": "tag", "val": "a", }, Object { "col": 2, "line": 4, "type": "start-attributes", }, Object { "col": 3, "line": 4, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/user/\' + id", }, Object { "col": 27, "line": 4, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'button\'", }, Object { "col": 45, "line": 4, "type": "end-attributes", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "col": 1, "line": 5, "type": "tag", "val": "meta", }, Object { "col": 5, "line": 5, "type": "start-attributes", }, Object { "col": 6, "line": 5, "mustEscape": true, "name": "key", "type": "attribute", "val": "\'answer\'", }, Object { "col": 20, "line": 5, "mustEscape": true, "name": "value", "type": "attribute", "val": "answer()", }, Object { "col": 34, "line": 5, "type": "end-attributes", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "col": 1, "line": 6, "type": "tag", "val": "a", }, Object { "col": 2, "line": 6, "type": "start-attributes", }, Object { "col": 3, "line": 6, "mustEscape": true, "name": "class", "type": "attribute", "val": "[\'class1\', \'class2\']", }, Object { "col": 31, "line": 6, "type": "end-attributes", }, Object { "col": 1, "line": 7, "type": "newline", }, Object { "col": 1, "line": 7, "type": "tag", "val": "a", }, Object { "col": 2, "line": 7, "type": "class", "val": "tag-class", }, Object { "col": 12, "line": 7, "type": "start-attributes", }, Object { "col": 13, "line": 7, "mustEscape": true, "name": "class", "type": "attribute", "val": "[\'class1\', \'class2\']", }, Object { "col": 41, "line": 7, "type": "end-attributes", }, Object { "col": 1, "line": 9, "type": "newline", }, Object { "col": 1, "line": 9, "type": "tag", "val": "a", }, Object { "col": 2, "line": 9, "type": "start-attributes", }, Object { "col": 3, "line": 9, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/user/\' + id", }, Object { "col": 22, "line": 9, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'button\'", }, Object { "col": 36, "line": 9, "type": "end-attributes", }, Object { "col": 1, "line": 10, "type": "newline", }, Object { "col": 1, "line": 10, "type": "tag", "val": "a", }, Object { "col": 2, "line": 10, "type": "start-attributes", }, Object { "col": 3, "line": 10, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/user/\' + id", }, Object { "col": 26, "line": 10, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'button\'", }, Object { "col": 44, "line": 10, "type": "end-attributes", }, Object { "col": 1, "line": 11, "type": "newline", }, Object { "col": 1, "line": 11, "type": "tag", "val": "meta", }, Object { "col": 5, "line": 11, "type": "start-attributes", }, Object { "col": 6, "line": 11, "mustEscape": true, "name": "key", "type": "attribute", "val": "\'answer\'", }, Object { "col": 19, "line": 11, "mustEscape": true, "name": "value", "type": "attribute", "val": "answer()", }, Object { "col": 33, "line": 11, "type": "end-attributes", }, Object { "col": 1, "line": 12, "type": "newline", }, Object { "col": 1, "line": 12, "type": "tag", "val": "a", }, Object { "col": 2, "line": 12, "type": "start-attributes", }, Object { "col": 3, "line": 12, "mustEscape": true, "name": "class", "type": "attribute", "val": "[\'class1\', \'class2\']", }, Object { "col": 31, "line": 12, "type": "end-attributes", }, Object { "col": 1, "line": 13, "type": "newline", }, Object { "col": 1, "line": 13, "type": "tag", "val": "a", }, Object { "col": 2, "line": 13, "type": "class", "val": "tag-class", }, Object { "col": 12, "line": 13, "type": "start-attributes", }, Object { "col": 13, "line": 13, "mustEscape": true, "name": "class", "type": "attribute", "val": "[\'class1\', \'class2\']", }, Object { "col": 41, "line": 13, "type": "end-attributes", }, Object { "col": 1, "line": 15, "type": "newline", }, Object { "col": 1, "line": 15, "type": "tag", "val": "div", }, Object { "col": 4, "line": 15, "type": "start-attributes", }, Object { "col": 5, "line": 15, "mustEscape": true, "name": "id", "type": "attribute", "val": "id", }, Object { "col": 10, "line": 15, "type": "end-attributes", }, Object { "col": 11, "line": 15, "type": "&attributes", "val": "{foo: \'bar\'}", }, Object { "col": 1, "line": 16, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 16, "mustEscape": false, "type": "code", "val": "var bar = null", }, Object { "col": 1, "line": 17, "type": "newline", }, Object { "col": 1, "line": 17, "type": "tag", "val": "div", }, Object { "col": 4, "line": 17, "type": "start-attributes", }, Object { "col": 5, "line": 17, "mustEscape": true, "name": "foo", "type": "attribute", "val": "null", }, Object { "col": 14, "line": 17, "mustEscape": true, "name": "bar", "type": "attribute", "val": "bar", }, Object { "col": 21, "line": 17, "type": "end-attributes", }, Object { "col": 22, "line": 17, "type": "&attributes", "val": "{baz: \'baz\'}", }, Object { "col": 1, "line": 18, "type": "newline", }, Object { "col": 1, "line": 18, "type": "eos", }, ] `; exports[`test attrs.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "a", }, Object { "col": 2, "line": 1, "type": "start-attributes", }, Object { "col": 3, "line": 1, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/contact\'", }, Object { "col": 18, "line": 1, "type": "end-attributes", }, Object { "col": 20, "line": 1, "type": "text", "val": "contact", }, Object { "col": 1, "line": 2, "type": "newline", }, Object { "col": 1, "line": 2, "type": "tag", "val": "a", }, Object { "col": 2, "line": 2, "type": "start-attributes", }, Object { "col": 3, "line": 2, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/save\'", }, Object { "col": 15, "line": 2, "type": "end-attributes", }, Object { "col": 16, "line": 2, "type": "class", "val": "button", }, Object { "col": 24, "line": 2, "type": "text", "val": "save", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "a", }, Object { "col": 2, "line": 3, "type": "start-attributes", }, Object { "col": 3, "line": 3, "mustEscape": true, "name": "foo", "type": "attribute", "val": true, }, Object { "col": 8, "line": 3, "mustEscape": false, "name": "bar", "type": "attribute", "val": true, }, Object { "col": 13, "line": 3, "mustEscape": false, "name": "baz", "type": "attribute", "val": true, }, Object { "col": 16, "line": 3, "type": "end-attributes", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 1, "line": 4, "type": "tag", "val": "a", }, Object { "col": 2, "line": 4, "type": "start-attributes", }, Object { "col": 3, "line": 4, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'foo, bar, baz\'", }, Object { "col": 24, "line": 4, "mustEscape": true, "name": "bar", "type": "attribute", "val": "1", }, Object { "col": 29, "line": 4, "type": "end-attributes", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "col": 1, "line": 5, "type": "tag", "val": "a", }, Object { "col": 2, "line": 5, "type": "start-attributes", }, Object { "col": 3, "line": 5, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'((foo))\'", }, Object { "col": 18, "line": 5, "mustEscape": true, "name": "bar", "type": "attribute", "val": "(1) ? 1 : 0", }, Object { "col": 35, "line": 5, "type": "end-attributes", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "col": 1, "line": 6, "type": "tag", "val": "select", }, Object { "col": 1, "line": 7, "type": "indent", "val": 2, }, Object { "col": 3, "line": 7, "type": "tag", "val": "option", }, Object { "col": 9, "line": 7, "type": "start-attributes", }, Object { "col": 10, "line": 7, "mustEscape": true, "name": "value", "type": "attribute", "val": "\'foo\'", }, Object { "col": 23, "line": 7, "mustEscape": false, "name": "selected", "type": "attribute", "val": true, }, Object { "col": 31, "line": 7, "type": "end-attributes", }, Object { "col": 33, "line": 7, "type": "text", "val": "Foo", }, Object { "col": 1, "line": 8, "type": "newline", }, Object { "col": 3, "line": 8, "type": "tag", "val": "option", }, Object { "col": 9, "line": 8, "type": "start-attributes", }, Object { "col": 10, "line": 8, "mustEscape": true, "name": "selected", "type": "attribute", "val": true, }, Object { "col": 20, "line": 8, "mustEscape": true, "name": "value", "type": "attribute", "val": "\'bar\'", }, Object { "col": 31, "line": 8, "type": "end-attributes", }, Object { "col": 33, "line": 8, "type": "text", "val": "Bar", }, Object { "col": 1, "line": 9, "type": "outdent", }, Object { "col": 1, "line": 9, "type": "tag", "val": "a", }, Object { "col": 2, "line": 9, "type": "start-attributes", }, Object { "col": 3, "line": 9, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\"class:\"", }, Object { "col": 15, "line": 9, "type": "end-attributes", }, Object { "col": 1, "line": 10, "type": "newline", }, Object { "col": 1, "line": 10, "type": "tag", "val": "input", }, Object { "col": 6, "line": 10, "type": "start-attributes", }, Object { "col": 7, "line": 10, "mustEscape": true, "name": "pattern", "type": "attribute", "val": "\'\\\\S+\'", }, Object { "col": 21, "line": 10, "type": "end-attributes", }, Object { "col": 1, "line": 12, "type": "newline", }, Object { "col": 1, "line": 12, "type": "tag", "val": "a", }, Object { "col": 2, "line": 12, "type": "start-attributes", }, Object { "col": 3, "line": 12, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/contact\'", }, Object { "col": 18, "line": 12, "type": "end-attributes", }, Object { "col": 20, "line": 12, "type": "text", "val": "contact", }, Object { "col": 1, "line": 13, "type": "newline", }, Object { "col": 1, "line": 13, "type": "tag", "val": "a", }, Object { "col": 2, "line": 13, "type": "start-attributes", }, Object { "col": 3, "line": 13, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'/save\'", }, Object { "col": 15, "line": 13, "type": "end-attributes", }, Object { "col": 16, "line": 13, "type": "class", "val": "button", }, Object { "col": 24, "line": 13, "type": "text", "val": "save", }, Object { "col": 1, "line": 14, "type": "newline", }, Object { "col": 1, "line": 14, "type": "tag", "val": "a", }, Object { "col": 2, "line": 14, "type": "start-attributes", }, Object { "col": 3, "line": 14, "mustEscape": true, "name": "foo", "type": "attribute", "val": true, }, Object { "col": 7, "line": 14, "mustEscape": false, "name": "bar", "type": "attribute", "val": true, }, Object { "col": 11, "line": 14, "mustEscape": false, "name": "baz", "type": "attribute", "val": true, }, Object { "col": 14, "line": 14, "type": "end-attributes", }, Object { "col": 1, "line": 15, "type": "newline", }, Object { "col": 1, "line": 15, "type": "tag", "val": "a", }, Object { "col": 2, "line": 15, "type": "start-attributes", }, Object { "col": 3, "line": 15, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'foo, bar, baz\'", }, Object { "col": 23, "line": 15, "mustEscape": true, "name": "bar", "type": "attribute", "val": "1", }, Object { "col": 28, "line": 15, "type": "end-attributes", }, Object { "col": 1, "line": 16, "type": "newline", }, Object { "col": 1, "line": 16, "type": "tag", "val": "a", }, Object { "col": 2, "line": 16, "type": "start-attributes", }, Object { "col": 3, "line": 16, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'((foo))\'", }, Object { "col": 17, "line": 16, "mustEscape": true, "name": "bar", "type": "attribute", "val": "(1) ? 1 : 0", }, Object { "col": 34, "line": 16, "type": "end-attributes", }, Object { "col": 1, "line": 17, "type": "newline", }, Object { "col": 1, "line": 17, "type": "tag", "val": "select", }, Object { "col": 1, "line": 18, "type": "indent", "val": 2, }, Object { "col": 3, "line": 18, "type": "tag", "val": "option", }, Object { "col": 9, "line": 18, "type": "start-attributes", }, Object { "col": 10, "line": 18, "mustEscape": true, "name": "value", "type": "attribute", "val": "\'foo\'", }, Object { "col": 22, "line": 18, "mustEscape": false, "name": "selected", "type": "attribute", "val": true, }, Object { "col": 30, "line": 18, "type": "end-attributes", }, Object { "col": 32, "line": 18, "type": "text", "val": "Foo", }, Object { "col": 1, "line": 19, "type": "newline", }, Object { "col": 3, "line": 19, "type": "tag", "val": "option", }, Object { "col": 9, "line": 19, "type": "start-attributes", }, Object { "col": 10, "line": 19, "mustEscape": true, "name": "selected", "type": "attribute", "val": true, }, Object { "col": 19, "line": 19, "mustEscape": true, "name": "value", "type": "attribute", "val": "\'bar\'", }, Object { "col": 30, "line": 19, "type": "end-attributes", }, Object { "col": 32, "line": 19, "type": "text", "val": "Bar", }, Object { "col": 1, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "tag", "val": "a", }, Object { "col": 2, "line": 20, "type": "start-attributes", }, Object { "col": 3, "line": 20, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\"class:\"", }, Object { "col": 15, "line": 20, "type": "end-attributes", }, Object { "col": 1, "line": 21, "type": "newline", }, Object { "col": 1, "line": 21, "type": "tag", "val": "input", }, Object { "col": 6, "line": 21, "type": "start-attributes", }, Object { "col": 7, "line": 21, "mustEscape": true, "name": "pattern", "type": "attribute", "val": "\'\\\\S+\'", }, Object { "col": 21, "line": 21, "type": "end-attributes", }, Object { "col": 1, "line": 22, "type": "newline", }, Object { "col": 1, "line": 22, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 22, "type": "start-attributes", }, Object { "col": 5, "line": 22, "mustEscape": true, "name": "terse", "type": "attribute", "val": "\"true\"", }, Object { "col": 17, "line": 22, "type": "end-attributes", }, Object { "col": 1, "line": 23, "type": "newline", }, Object { "col": 1, "line": 23, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 23, "type": "start-attributes", }, Object { "col": 5, "line": 23, "mustEscape": true, "name": "date", "type": "attribute", "val": "new Date(0)", }, Object { "col": 21, "line": 23, "type": "end-attributes", }, Object { "col": 1, "line": 25, "type": "newline", }, Object { "col": 1, "line": 25, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 25, "type": "start-attributes", }, Object { "col": 5, "line": 25, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 5, "line": 26, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 8, "line": 26, "type": "end-attributes", }, Object { "col": 1, "line": 27, "type": "newline", }, Object { "col": 1, "line": 27, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 27, "type": "start-attributes", }, Object { "col": 5, "line": 27, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 5, "line": 28, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 8, "line": 28, "type": "end-attributes", }, Object { "col": 1, "line": 29, "type": "newline", }, Object { "col": 1, "line": 29, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 29, "type": "start-attributes", }, Object { "col": 5, "line": 29, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 3, "line": 30, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 6, "line": 30, "type": "end-attributes", }, Object { "col": 1, "line": 31, "type": "newline", }, Object { "col": 1, "line": 31, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 31, "type": "start-attributes", }, Object { "col": 5, "line": 31, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 4, "line": 32, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 7, "line": 32, "type": "end-attributes", }, Object { "col": 1, "line": 33, "type": "newline", }, Object { "col": 1, "line": 33, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 33, "type": "start-attributes", }, Object { "col": 5, "line": 33, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 3, "line": 34, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 6, "line": 34, "type": "end-attributes", }, Object { "col": 1, "line": 35, "type": "newline", }, Object { "col": 1, "line": 35, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 35, "type": "start-attributes", }, Object { "col": 5, "line": 35, "mustEscape": true, "name": "abc", "type": "attribute", "val": true, }, Object { "col": 5, "line": 36, "mustEscape": false, "name": "def", "type": "attribute", "val": true, }, Object { "col": 8, "line": 36, "type": "end-attributes", }, Object { "col": 1, "line": 38, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 38, "mustEscape": false, "type": "code", "val": "var attrs = {foo: \'bar\', bar: \'\'}", }, Object { "col": 1, "line": 40, "type": "newline", }, Object { "col": 1, "line": 40, "type": "tag", "val": "div", }, Object { "col": 4, "line": 40, "type": "&attributes", "val": "attrs", }, Object { "col": 1, "line": 42, "type": "newline", }, Object { "col": 1, "line": 42, "type": "tag", "val": "a", }, Object { "col": 2, "line": 42, "type": "start-attributes", }, Object { "col": 3, "line": 42, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'foo\'", }, Object { "col": 14, "line": 42, "mustEscape": true, "name": "bar", "type": "attribute", "val": "\"bar\"", }, Object { "col": 24, "line": 42, "type": "end-attributes", }, Object { "col": 1, "line": 43, "type": "newline", }, Object { "col": 1, "line": 43, "type": "tag", "val": "a", }, Object { "col": 2, "line": 43, "type": "start-attributes", }, Object { "col": 3, "line": 43, "mustEscape": true, "name": "foo", "type": "attribute", "val": "\'foo\'", }, Object { "col": 14, "line": 43, "mustEscape": true, "name": "bar", "type": "attribute", "val": "\'bar\'", }, Object { "col": 24, "line": 43, "type": "end-attributes", }, Object { "col": 1, "line": 44, "type": "newline", }, Object { "col": 1, "line": 44, "type": "eos", }, ] `; exports[`test attrs.unescaped.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "script", }, Object { "col": 7, "line": 1, "type": "start-attributes", }, Object { "col": 8, "line": 1, "mustEscape": true, "name": "type", "type": "attribute", "val": "\'text/x-template\'", }, Object { "col": 30, "line": 1, "type": "end-attributes", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "div", }, Object { "col": 6, "line": 2, "type": "start-attributes", }, Object { "col": 7, "line": 2, "mustEscape": false, "name": "id", "type": "attribute", "val": "\'user-<%= user.id %>\'", }, Object { "col": 32, "line": 2, "type": "end-attributes", }, Object { "col": 1, "line": 3, "type": "indent", "val": 4, }, Object { "col": 5, "line": 3, "type": "tag", "val": "h1", }, Object { "col": 8, "line": 3, "type": "text", "val": "<%= user.title %>", }, Object { "col": 25, "line": 3, "type": "outdent", }, Object { "col": 25, "line": 3, "type": "outdent", }, Object { "col": 25, "line": 3, "type": "eos", }, ] `; exports[`test attrs-data.pug 1`] = ` Array [ Object { "buffer": false, "col": 1, "line": 1, "mustEscape": false, "type": "code", "val": "var user = { name: \'tobi\' }", }, Object { "col": 1, "line": 2, "type": "newline", }, Object { "col": 1, "line": 2, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 2, "type": "start-attributes", }, Object { "col": 5, "line": 2, "mustEscape": true, "name": "data-user", "type": "attribute", "val": "user", }, Object { "col": 19, "line": 2, "type": "end-attributes", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 3, "type": "start-attributes", }, Object { "col": 5, "line": 3, "mustEscape": true, "name": "data-items", "type": "attribute", "val": "[1,2,3]", }, Object { "col": 23, "line": 3, "type": "end-attributes", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 1, "line": 4, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 4, "type": "start-attributes", }, Object { "col": 5, "line": 4, "mustEscape": true, "name": "data-username", "type": "attribute", "val": "\'tobi\'", }, Object { "col": 25, "line": 4, "type": "end-attributes", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "col": 1, "line": 5, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 5, "type": "start-attributes", }, Object { "col": 5, "line": 5, "mustEscape": true, "name": "data-escaped", "type": "attribute", "val": "{message: \"Let\'s rock!\"}", }, Object { "col": 42, "line": 5, "type": "end-attributes", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "col": 1, "line": 6, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 6, "type": "start-attributes", }, Object { "col": 5, "line": 6, "mustEscape": true, "name": "data-ampersand", "type": "attribute", "val": "{message: \"a quote: " this & that\"}", }, Object { "col": 60, "line": 6, "type": "end-attributes", }, Object { "col": 1, "line": 7, "type": "newline", }, Object { "col": 1, "line": 7, "type": "tag", "val": "foo", }, Object { "col": 4, "line": 7, "type": "start-attributes", }, Object { "col": 5, "line": 7, "mustEscape": true, "name": "data-epoc", "type": "attribute", "val": "new Date(0)", }, Object { "col": 26, "line": 7, "type": "end-attributes", }, Object { "col": 1, "line": 8, "type": "newline", }, Object { "col": 1, "line": 8, "type": "eos", }, ] `; exports[`test basic.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "html", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "body", }, Object { "col": 1, "line": 3, "type": "indent", "val": 4, }, Object { "col": 5, "line": 3, "type": "tag", "val": "h1", }, Object { "col": 8, "line": 3, "type": "text", "val": "Title", }, Object { "col": 13, "line": 3, "type": "outdent", }, Object { "col": 13, "line": 3, "type": "outdent", }, Object { "col": 13, "line": 3, "type": "eos", }, ] `; exports[`test blanks.pug 1`] = ` Array [ Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "ul", }, Object { "col": 1, "line": 4, "type": "indent", "val": 2, }, Object { "col": 3, "line": 4, "type": "tag", "val": "li", }, Object { "col": 6, "line": 4, "type": "text", "val": "foo", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "col": 3, "line": 6, "type": "tag", "val": "li", }, Object { "col": 6, "line": 6, "type": "text", "val": "bar", }, Object { "col": 1, "line": 8, "type": "newline", }, Object { "col": 3, "line": 8, "type": "tag", "val": "li", }, Object { "col": 6, "line": 8, "type": "text", "val": "baz", }, Object { "col": 1, "line": 9, "type": "outdent", }, Object { "col": 1, "line": 9, "type": "eos", }, ] `; exports[`test block-code.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "blockcode", }, Object { "col": 2, "line": 1, "type": "start-pipeless-text", }, Object { "col": 3, "line": 2, "type": "text", "val": "list = [\"uno\", \"dos\", \"tres\",", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 3, "line": 3, "type": "text", "val": " \"cuatro\", \"cinco\", \"seis\"];", }, Object { "col": 38, "line": 3, "type": "end-pipeless-text", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 4, "type": "comment", "val": " Without a block, the element is accepted and no code is generated", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "col": 1, "line": 5, "type": "blockcode", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "code": "list", "col": 1, "key": null, "line": 6, "type": "each", "val": "item", }, Object { "col": 1, "line": 7, "type": "indent", "val": 2, }, Object { "col": 3, "line": 7, "type": "blockcode", }, Object { "col": 4, "line": 7, "type": "start-pipeless-text", }, Object { "col": 5, "line": 8, "type": "text", "val": "string = item.charAt(0)", }, Object { "col": 1, "line": 9, "type": "newline", }, Object { "col": 5, "line": 9, "type": "text", "val": "", }, Object { "col": 1, "line": 10, "type": "newline", }, Object { "col": 5, "line": 10, "type": "text", "val": " .toUpperCase() +", }, Object { "col": 1, "line": 11, "type": "newline", }, Object { "col": 5, "line": 11, "type": "text", "val": "item.slice(1);", }, Object { "col": 19, "line": 11, "type": "end-pipeless-text", }, Object { "col": 1, "line": 12, "type": "newline", }, Object { "col": 3, "line": 12, "type": "tag", "val": "li", }, Object { "buffer": true, "col": 5, "line": 12, "mustEscape": true, "type": "code", "val": "string", }, Object { "col": 1, "line": 13, "type": "outdent", }, Object { "col": 1, "line": 13, "type": "eos", }, ] `; exports[`test block-expansion.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "ul", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "li", }, Object { "col": 5, "line": 2, "type": ":", }, Object { "col": 7, "line": 2, "type": "tag", "val": "a", }, Object { "col": 8, "line": 2, "type": "start-attributes", }, Object { "col": 9, "line": 2, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'#\'", }, Object { "col": 17, "line": 2, "type": "end-attributes", }, Object { "col": 19, "line": 2, "type": "text", "val": "foo", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 3, "line": 3, "type": "tag", "val": "li", }, Object { "col": 5, "line": 3, "type": ":", }, Object { "col": 7, "line": 3, "type": "tag", "val": "a", }, Object { "col": 8, "line": 3, "type": "start-attributes", }, Object { "col": 9, "line": 3, "mustEscape": true, "name": "href", "type": "attribute", "val": "\'#\'", }, Object { "col": 17, "line": 3, "type": "end-attributes", }, Object { "col": 19, "line": 3, "type": "text", "val": "bar", }, Object { "col": 1, "line": 5, "type": "outdent", }, Object { "col": 1, "line": 5, "type": "tag", "val": "p", }, Object { "col": 3, "line": 5, "type": "text", "val": "baz", }, Object { "col": 6, "line": 5, "type": "eos", }, ] `; exports[`test block-expansion.shorthands.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "ul", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "li", }, Object { "col": 5, "line": 2, "type": "class", "val": "list-item", }, Object { "col": 15, "line": 2, "type": ":", }, Object { "col": 17, "line": 2, "type": "class", "val": "foo", }, Object { "col": 21, "line": 2, "type": ":", }, Object { "col": 23, "line": 2, "type": "id", "val": "bar", }, Object { "col": 28, "line": 2, "type": "text", "val": "baz", }, Object { "col": 31, "line": 2, "type": "outdent", }, Object { "col": 31, "line": 2, "type": "eos", }, ] `; exports[`test blockquote.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "figure", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "blockquote", }, Object { "col": 1, "line": 3, "type": "indent", "val": 4, }, Object { "col": 7, "line": 3, "type": "text", "val": "Try to define yourself by what you do, and you’ll burnout every time. You are. That is enough. I rest in that.", }, Object { "col": 3, "line": 4, "type": "outdent", }, Object { "col": 3, "line": 4, "type": "tag", "val": "figcaption", }, Object { "col": 14, "line": 4, "type": "text", "val": "from @thefray at 1:43pm on May 10", }, Object { "col": 47, "line": 4, "type": "outdent", }, Object { "col": 47, "line": 4, "type": "eos", }, ] `; exports[`test blocks-in-blocks.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "extends", }, Object { "col": 9, "line": 1, "type": "path", "val": "./auxiliary/blocks-in-blocks-layout.pug", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "mode": "replace", "type": "block", "val": "body", }, Object { "col": 1, "line": 4, "type": "indent", "val": 2, }, Object { "col": 3, "line": 4, "type": "tag", "val": "h1", }, Object { "col": 6, "line": 4, "type": "text", "val": "Page 2", }, Object { "col": 1, "line": 5, "type": "outdent", }, Object { "col": 1, "line": 5, "type": "eos", }, ] `; exports[`test blocks-in-if.pug 1`] = ` Array [ Object { "buffer": false, "col": 1, "line": 1, "type": "comment", "val": " see https://github.com/pugjs/pug/issues/1589", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 3, "mustEscape": false, "type": "code", "val": "var ajax = true", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 5, "mustEscape": false, "type": "code", "val": "if( ajax )", }, Object { "col": 1, "line": 6, "type": "indent", "val": 4, }, Object { "buffer": false, "col": 5, "line": 6, "type": "comment", "val": " return only contents if ajax requests", }, Object { "col": 1, "line": 7, "type": "newline", }, Object { "col": 5, "line": 7, "mode": "replace", "type": "block", "val": "contents", }, Object { "col": 1, "line": 8, "type": "indent", "val": 8, }, Object { "col": 9, "line": 8, "type": "tag", "val": "p", }, Object { "col": 11, "line": 8, "type": "text", "val": "ajax contents", }, Object { "col": 5, "line": 10, "type": "outdent", }, Object { "col": 1, "line": 10, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 10, "mustEscape": false, "type": "code", "val": "else", }, Object { "col": 1, "line": 11, "type": "indent", "val": 4, }, Object { "buffer": false, "col": 5, "line": 11, "type": "comment", "val": " return all html", }, Object { "col": 1, "line": 12, "type": "newline", }, Object { "col": 5, "line": 12, "type": "doctype", "val": "html", }, Object { "col": 1, "line": 13, "type": "newline", }, Object { "col": 5, "line": 13, "type": "tag", "val": "html", }, Object { "col": 1, "line": 14, "type": "indent", "val": 8, }, Object { "col": 9, "line": 14, "type": "tag", "val": "head", }, Object { "col": 1, "line": 15, "type": "indent", "val": 12, }, Object { "col": 13, "line": 15, "type": "tag", "val": "meta", }, Object { "col": 17, "line": 15, "type": "start-attributes", }, Object { "col": 19, "line": 15, "mustEscape": true, "name": "charset", "type": "attribute", "val": "\'utf8\'", }, Object { "col": 34, "line": 15, "type": "end-attributes", }, Object { "col": 1, "line": 16, "type": "newline", }, Object { "col": 13, "line": 16, "type": "tag", "val": "title", }, Object { "col": 19, "line": 16, "type": "text", "val": "sample", }, Object { "col": 1, "line": 17, "type": "newline", }, Object { "col": 13, "line": 17, "type": "tag", "val": "body", }, Object { "col": 1, "line": 18, "type": "indent", "val": 16, }, Object { "col": 17, "line": 18, "mode": "replace", "type": "block", "val": "contents", }, Object { "col": 1, "line": 19, "type": "indent", "val": 20, }, Object { "col": 21, "line": 19, "type": "tag", "val": "p", }, Object { "col": 23, "line": 19, "type": "text", "val": "all contetns", }, Object { "col": 17, "line": 20, "type": "outdent", }, Object { "col": 13, "line": 20, "type": "outdent", }, Object { "col": 9, "line": 20, "type": "outdent", }, Object { "col": 5, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "eos", }, ] `; exports[`test case.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "html", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "body", }, Object { "col": 1, "line": 3, "type": "indent", "val": 4, }, Object { "buffer": false, "col": 5, "line": 3, "mustEscape": false, "type": "code", "val": "var friends = 1", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 5, "line": 4, "type": "case", "val": "friends", }, Object { "col": 1, "line": 5, "type": "indent", "val": 6, }, Object { "col": 7, "line": 5, "type": "when", "val": "0", }, Object { "col": 13, "line": 5, "type": ":", }, Object { "col": 15, "line": 5, "type": "tag", "val": "p", }, Object { "col": 17, "line": 5, "type": "text", "val": "you have no friends", }, Object { "col": 1, "line": 6, "type": "newline", }, Object { "col": 7, "line": 6, "type": "when", "val": "1", }, Object { "col": 13, "line": 6, "type": ":", }, Object { "col": 15, "line": 6, "type": "tag", "val": "p", }, Object { "col": 17, "line": 6, "type": "text", "val": "you have a friend", }, Object { "col": 1, "line": 7, "type": "newline", }, Object { "col": 7, "line": 7, "type": "default", }, Object { "col": 14, "line": 7, "type": ":", }, Object { "col": 16, "line": 7, "type": "tag", "val": "p", }, Object { "col": 18, "line": 7, "type": "text", "val": "you have ", }, Object { "buffer": true, "col": 27, "line": 7, "mustEscape": true, "type": "interpolated-code", "val": "friends", }, Object { "col": 37, "line": 7, "type": "text", "val": " friends", }, Object { "col": 5, "line": 8, "type": "outdent", }, Object { "buffer": false, "col": 5, "line": 8, "mustEscape": false, "type": "code", "val": "var friends = 0", }, Object { "col": 1, "line": 9, "type": "newline", }, Object { "col": 5, "line": 9, "type": "case", "val": "friends", }, Object { "col": 1, "line": 10, "type": "indent", "val": 6, }, Object { "col": 7, "line": 10, "type": "when", "val": "0", }, Object { "col": 1, "line": 11, "type": "newline", }, Object { "col": 7, "line": 11, "type": "when", "val": "1", }, Object { "col": 1, "line": 12, "type": "indent", "val": 8, }, Object { "col": 9, "line": 12, "type": "tag", "val": "p", }, Object { "col": 11, "line": 12, "type": "text", "val": "you have very few friends", }, Object { "col": 7, "line": 13, "type": "outdent", }, Object { "col": 7, "line": 13, "type": "default", }, Object { "col": 1, "line": 14, "type": "indent", "val": 8, }, Object { "col": 9, "line": 14, "type": "tag", "val": "p", }, Object { "col": 11, "line": 14, "type": "text", "val": "you have ", }, Object { "buffer": true, "col": 20, "line": 14, "mustEscape": true, "type": "interpolated-code", "val": "friends", }, Object { "col": 30, "line": 14, "type": "text", "val": " friends", }, Object { "col": 7, "line": 16, "type": "outdent", }, Object { "col": 5, "line": 16, "type": "outdent", }, Object { "buffer": false, "col": 5, "line": 16, "mustEscape": false, "type": "code", "val": "var friend = \'Tim:G\'", }, Object { "col": 1, "line": 17, "type": "newline", }, Object { "col": 5, "line": 17, "type": "case", "val": "friend", }, Object { "col": 1, "line": 18, "type": "indent", "val": 6, }, Object { "col": 7, "line": 18, "type": "when", "val": "\'Tim:G\'", }, Object { "col": 19, "line": 18, "type": ":", }, Object { "col": 24, "line": 18, "type": "tag", "val": "p", }, Object { "col": 26, "line": 18, "type": "text", "val": "Friend is a string", }, Object { "col": 1, "line": 19, "type": "newline", }, Object { "col": 7, "line": 19, "type": "when", "val": "{tim: \'g\'}", }, Object { "col": 22, "line": 19, "type": ":", }, Object { "col": 24, "line": 19, "type": "tag", "val": "p", }, Object { "col": 26, "line": 19, "type": "text", "val": "Friend is an object", }, Object { "col": 5, "line": 20, "type": "outdent", }, Object { "col": 3, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "eos", }, ] `; exports[`test case-blocks.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "html", }, Object { "col": 1, "line": 2, "type": "indent", "val": 2, }, Object { "col": 3, "line": 2, "type": "tag", "val": "body", }, Object { "col": 1, "line": 3, "type": "indent", "val": 4, }, Object { "buffer": false, "col": 5, "line": 3, "mustEscape": false, "type": "code", "val": "var friends = 1", }, Object { "col": 1, "line": 4, "type": "newline", }, Object { "col": 5, "line": 4, "type": "case", "val": "friends", }, Object { "col": 1, "line": 5, "type": "indent", "val": 6, }, Object { "col": 7, "line": 5, "type": "when", "val": "0", }, Object { "col": 1, "line": 6, "type": "indent", "val": 8, }, Object { "col": 9, "line": 6, "type": "tag", "val": "p", }, Object { "col": 11, "line": 6, "type": "text", "val": "you have no friends", }, Object { "col": 7, "line": 7, "type": "outdent", }, Object { "col": 7, "line": 7, "type": "when", "val": "1", }, Object { "col": 1, "line": 8, "type": "indent", "val": 8, }, Object { "col": 9, "line": 8, "type": "tag", "val": "p", }, Object { "col": 11, "line": 8, "type": "text", "val": "you have a friend", }, Object { "col": 7, "line": 9, "type": "outdent", }, Object { "col": 7, "line": 9, "type": "default", }, Object { "col": 1, "line": 10, "type": "indent", "val": 8, }, Object { "col": 9, "line": 10, "type": "tag", "val": "p", }, Object { "col": 11, "line": 10, "type": "text", "val": "you have ", }, Object { "buffer": true, "col": 20, "line": 10, "mustEscape": true, "type": "interpolated-code", "val": "friends", }, Object { "col": 30, "line": 10, "type": "text", "val": " friends", }, Object { "col": 38, "line": 10, "type": "outdent", }, Object { "col": 38, "line": 10, "type": "outdent", }, Object { "col": 38, "line": 10, "type": "outdent", }, Object { "col": 38, "line": 10, "type": "outdent", }, Object { "col": 38, "line": 10, "type": "eos", }, ] `; exports[`test case-with-invalid-expression.pug 1`] = ` Object { "code": "PUG:SYNTAX_ERROR", "column": 22, "line": 1, "msg": "Syntax Error: Unexpected token", } `; exports[`test case-with-no-expression.pug 1`] = ` Object { "code": "PUG:NO_CASE_EXPRESSION", "column": 5, "line": 1, "msg": "missing expression for case", } `; exports[`test classes.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "a", }, Object { "col": 2, "line": 1, "type": "start-attributes", }, Object { "col": 3, "line": 1, "mustEscape": true, "name": "class", "type": "attribute", "val": "[\'foo\', \'bar\', \'baz\']", }, Object { "col": 30, "line": 1, "type": "end-attributes", }, Object { "col": 1, "line": 5, "type": "newline", }, Object { "col": 1, "line": 5, "type": "tag", "val": "a", }, Object { "col": 2, "line": 5, "type": "class", "val": "foo", }, Object { "col": 6, "line": 5, "type": "start-attributes", }, Object { "col": 7, "line": 5, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'bar\'", }, Object { "col": 18, "line": 5, "type": "end-attributes", }, Object { "col": 19, "line": 5, "type": "class", "val": "baz", }, Object { "col": 1, "line": 9, "type": "newline", }, Object { "col": 1, "line": 9, "type": "tag", "val": "a", }, Object { "col": 2, "line": 9, "type": "class", "val": "foo-bar_baz", }, Object { "col": 1, "line": 11, "type": "newline", }, Object { "col": 1, "line": 11, "type": "tag", "val": "a", }, Object { "col": 2, "line": 11, "type": "start-attributes", }, Object { "col": 3, "line": 11, "mustEscape": true, "name": "class", "type": "attribute", "val": "{foo: true, bar: false, baz: true}", }, Object { "col": 43, "line": 11, "type": "end-attributes", }, Object { "col": 1, "line": 12, "type": "newline", }, Object { "col": 1, "line": 12, "type": "eos", }, ] `; exports[`test classes-empty.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "a", }, Object { "col": 2, "line": 1, "type": "start-attributes", }, Object { "col": 3, "line": 1, "mustEscape": true, "name": "class", "type": "attribute", "val": "\'\'", }, Object { "col": 11, "line": 1, "type": "end-attributes", }, Object { "col": 1, "line": 2, "type": "newline", }, Object { "col": 1, "line": 2, "type": "tag", "val": "a", }, Object { "col": 2, "line": 2, "type": "start-attributes", }, Object { "col": 3, "line": 2, "mustEscape": true, "name": "class", "type": "attribute", "val": "null", }, Object { "col": 13, "line": 2, "type": "end-attributes", }, Object { "col": 1, "line": 3, "type": "newline", }, Object { "col": 1, "line": 3, "type": "tag", "val": "a", }, Object { "col": 2, "line": 3, "type": "start-attributes", }, Object { "col": 3, "line": 3, "mustEscape": true, "name": "class", "type": "attribute", "val": "undefined", }, Object { "col": 18, "line": 3, "type": "end-attributes", }, Object { "col": 19, "line": 3, "type": "eos", }, ] `; exports[`test code.conditionals.pug 1`] = ` Array [ Object { "col": 1, "line": 2, "type": "newline", }, Object { "buffer": false, "col": 1, "line": 2, "mustEscape": false, "type": "code", "val": "if (true)", }, Object { "col": 1, "line": 3, "type": "indent", "val": 2, }, Object { "col": 3, "line": 3, "type": "tag", "val": "p", }, Object { "col": 5, "line": 3, "type": "text", "val": "foo", }, Object { "col": 1, "line": 4, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 4, "mustEscape": false, "type": "code", "val": "else", }, Object { "col": 1, "line": 5, "type": "indent", "val": 2, }, Object { "col": 3, "line": 5, "type": "tag", "val": "p", }, Object { "col": 5, "line": 5, "type": "text", "val": "bar", }, Object { "col": 1, "line": 7, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 7, "mustEscape": false, "type": "code", "val": "if (true) {", }, Object { "col": 1, "line": 8, "type": "indent", "val": 2, }, Object { "col": 3, "line": 8, "type": "tag", "val": "p", }, Object { "col": 5, "line": 8, "type": "text", "val": "foo", }, Object { "col": 1, "line": 9, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 9, "mustEscape": false, "type": "code", "val": "} else {", }, Object { "col": 1, "line": 10, "type": "indent", "val": 2, }, Object { "col": 3, "line": 10, "type": "tag", "val": "p", }, Object { "col": 5, "line": 10, "type": "text", "val": "bar", }, Object { "col": 1, "line": 11, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 11, "mustEscape": false, "type": "code", "val": "}", }, Object { "col": 1, "line": 13, "type": "newline", }, Object { "col": 1, "line": 13, "type": "if", "val": "true", }, Object { "col": 1, "line": 14, "type": "indent", "val": 2, }, Object { "col": 3, "line": 14, "type": "tag", "val": "p", }, Object { "col": 5, "line": 14, "type": "text", "val": "foo", }, Object { "col": 1, "line": 15, "type": "newline", }, Object { "col": 3, "line": 15, "type": "tag", "val": "p", }, Object { "col": 5, "line": 15, "type": "text", "val": "bar", }, Object { "col": 1, "line": 16, "type": "newline", }, Object { "col": 3, "line": 16, "type": "tag", "val": "p", }, Object { "col": 5, "line": 16, "type": "text", "val": "baz", }, Object { "col": 1, "line": 17, "type": "outdent", }, Object { "col": 1, "line": 17, "type": "else", "val": "", }, Object { "col": 1, "line": 18, "type": "indent", "val": 2, }, Object { "col": 3, "line": 18, "type": "tag", "val": "p", }, Object { "col": 5, "line": 18, "type": "text", "val": "bar", }, Object { "col": 1, "line": 20, "type": "outdent", }, Object { "col": 1, "line": 20, "type": "if", "val": "!(true)", }, Object { "col": 1, "line": 21, "type": "indent", "val": 2, }, Object { "col": 3, "line": 21, "type": "tag", "val": "p", }, Object { "col": 5, "line": 21, "type": "text", "val": "foo", }, Object { "col": 1, "line": 22, "type": "outdent", }, Object { "col": 1, "line": 22, "type": "else", "val": "", }, Object { "col": 1, "line": 23, "type": "indent", "val": 2, }, Object { "col": 3, "line": 23, "type": "tag", "val": "p", }, Object { "col": 5, "line": 23, "type": "text", "val": "bar", }, Object { "col": 1, "line": 25, "type": "outdent", }, Object { "col": 1, "line": 25, "type": "if", "val": "\'nested\'", }, Object { "col": 1, "line": 26, "type": "indent", "val": 2, }, Object { "col": 3, "line": 26, "type": "if", "val": "\'works\'", }, Object { "col": 1, "line": 27, "type": "indent", "val": 4, }, Object { "col": 5, "line": 27, "type": "tag", "val": "p", }, Object { "col": 7, "line": 27, "type": "text", "val": "yay", }, Object { "col": 3, "line": 29, "type": "outdent", }, Object { "col": 1, "line": 29, "type": "outdent", }, Object { "buffer": false, "col": 1, "line": 29, "type": "comment", "val": " allow empty blocks", }, Object { "col": 1, "line": 30, "type": "newline", }, Object { "col": 1, "line": 30, "type": "if", "val": "false", }, Object { "col": 1, "line": 31, "type": "newline", }, Object { "col": 1, "line": 31, "type": "else", "val": "", }, Object { "col": 1, "line": 32, "type": "indent", "val": 2, }, Object { "col": 3, "line": 32, "type": "class", "val": "bar", }, Object { "col": 1, "line": 33, "type": "outdent", }, Object { "col": 1, "line": 33, "type": "if", "val": "true", }, Object { "col": 1, "line": 34, "type": "indent", "val": 2, }, Object { "col": 3, "line": 34, "type": "class", "val": "bar", }, Object { "col": 1, "line": 35, "type": "outdent", }, Object { "col": 1, "line": 35, "type": "else", "val": "", }, Object { "col": 1, "line": 36, "type": "newline", }, Object { "col": 1, "line": 36, "type": "class", "val": "bing", }, Object { "col": 1, "line": 38, "type": "newline", }, Object { "col": 1, "line": 38, "type": "if", "val": "false", }, Object { "col": 1, "line": 39, "type": "indent", "val": 2, }, Object { "col": 3, "line": 39, "type": "class", "val": "bing", }, Object { "col": 1, "line": 40, "type": "outdent", }, Object { "col": 1, "line": 40, "type": "else-if", "val": "false", }, Object { "col": 1, "line": 41, "type": "indent", "val": 2, }, Object { "col": 3, "line": 41, "type": "class", "val": "bar", }, Object { "col": 1, "line": 42, "type": "outdent", }, Object { "col": 1, "line": 42, "type": "else", "val": "", }, Object { "col": 1, "line": 43, "type": "indent", "val": 2, }, Object { "col": 3, "line": 43, "type": "class", "val": "foo", }, Object { "col": 7, "line": 43, "type": "outdent", }, Object { "col": 7, "line": 43, "type": "eos", }, ] `; exports[`test code.escape.pug 1`] = ` Array [ Object { "col": 1, "line": 1, "type": "tag", "val": "p", }, Object { "buffer": true, "col": 2, "line": 1, "mustEscape": true, "type": "code", "val": "\'