From 82f2fcc637ebea4bb26828ce3ca35ba638ccf643 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Wed, 8 Feb 2017 21:25:44 +0000
Subject: [PATCH 01/96] [pug-lexer][optimisation] Only call assertExpression
when necessary (#2712)
---
packages/pug-lexer/index.js | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js
index 91300f919..5f6977212 100644
--- a/packages/pug-lexer/index.js
+++ b/packages/pug-lexer/index.js
@@ -1059,22 +1059,25 @@ Lexer.prototype = {
} else if (loc === 'value') {
// if the character is in a string or in parentheses/brackets/braces
if (state.isNesting() || state.isString()) return false;
+
// if the current value expression is not valid JavaScript, then
- // assume that the user did not end the value
- if (!self.assertExpression(val, true)) return false;
+ // assume that the user did not end the value. To enforce this,
+ // we call `self.assertExpression(val, true)`, but since the other
+ // tests are much faster, we run the other tests first.
+
if (whitespaceRe.test(str[i])) {
// find the first non-whitespace character
for (var x = i; x < str.length; x++) {
if (!whitespaceRe.test(str[x])) {
// if it is a JavaScript punctuator, then assume that it is
// a part of the value
- return !characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]);
+ return (!characterParser.isPunctuator(str[x]) || quoteRe.test(str[x])) && self.assertExpression(val, true);
}
}
}
// if there's no whitespace and the character is not ',', the
// attribute did not end.
- return str[i] === ',';
+ return str[i] === ',' && self.assertExpression(val, true);
}
}
From 31d1f681817073ae789d8b18f70121e5a4577c83 Mon Sep 17 00:00:00 2001
From: John Manuel
Date: Mon, 17 Apr 2017 17:19:16 -0700
Subject: [PATCH 02/96] [pug-lexer] Allow a colon to start an attribute (#2773)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Add check for literal ‘:’
* Add test case for “typical” Vue.js short-cut syntax for `v-bind:` (`:`)
* New test case passes with change (fails without the change)
---
packages/pug-lexer/index.js | 2 +-
packages/pug/test/cases/attrs.colon.html | 1 +
packages/pug/test/cases/attrs.colon.pug | 9 +++++++++
3 files changed, 11 insertions(+), 1 deletion(-)
create mode 100644 packages/pug/test/cases/attrs.colon.html
create mode 100644 packages/pug/test/cases/attrs.colon.pug
diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js
index 5f6977212..f901332d6 100644
--- a/packages/pug-lexer/index.js
+++ b/packages/pug-lexer/index.js
@@ -1071,7 +1071,7 @@ Lexer.prototype = {
if (!whitespaceRe.test(str[x])) {
// if it is a JavaScript punctuator, then assume that it is
// a part of the value
- return (!characterParser.isPunctuator(str[x]) || quoteRe.test(str[x])) && self.assertExpression(val, true);
+ return (!characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]) || str[x] === ':') && self.assertExpression(val, true);
}
}
}
diff --git a/packages/pug/test/cases/attrs.colon.html b/packages/pug/test/cases/attrs.colon.html
new file mode 100644
index 000000000..f8e02d617
--- /dev/null
+++ b/packages/pug/test/cases/attrs.colon.html
@@ -0,0 +1 @@
+Click Me!
diff --git a/packages/pug/test/cases/attrs.colon.pug b/packages/pug/test/cases/attrs.colon.pug
new file mode 100644
index 000000000..ed7ea7cbb
--- /dev/null
+++ b/packages/pug/test/cases/attrs.colon.pug
@@ -0,0 +1,9 @@
+//- Tests for using a colon-prefexed attribute (typical when using short-cut for Vue.js `v-bind`)
+div(:my-var="model")
+span(v-for="item in items" :key="item.id" :value="item.name")
+span(
+ v-for="item in items"
+ :key="item.id"
+ :value="item.name"
+)
+a(:link="goHere" value="static" :my-value="dynamic" @click="onClick()" :another="more") Click Me!
From bc92bdc399169aed59d6ad07f9f51e8d3b63c50c Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Tue, 18 Apr 2017 01:33:51 +0100
Subject: [PATCH 03/96] [chore] Update tests (#2778)
coffee-script have released a new version with better output. Our
tests show the old coffee-script output.
---
.../pug-filters/test/__snapshots__/index.test.js.snap | 8 ++++----
packages/pug/test/cases/filters.coffeescript.html | 7 ++++---
packages/pug/test/cases/filters.include.html | 5 ++---
packages/pug/test/cases/filters.nested.html | 3 +--
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/packages/pug-filters/test/__snapshots__/index.test.js.snap b/packages/pug-filters/test/__snapshots__/index.test.js.snap
index e2df93687..b304bd56b 100644
--- a/packages/pug-filters/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-filters/test/__snapshots__/index.test.js.snap
@@ -150,7 +150,7 @@ exports[`test cases/filters.coffeescript.input.json 1`] = `
],
\"line\": 4,
\"filename\": \"filters.coffeescript.tokens.json\",
- \"val\": \"(function(){var n;n={square:function(n){return n*n}}}).call(this);\"
+ \"val\": \"(function(){}).call(this);\"
}
],
\"line\": 1,
@@ -381,7 +381,7 @@ exports[`test cases/filters.include.input.json 1`] = `
\"type\": \"Text\",
\"line\": 5,
\"filename\": \"filters.include.tokens.json\",
- \"val\": \"(function(){var n;n={square:function(n){return n*n}}}).call(this);\"
+ \"val\": \"(function(){}).call(this);\"
}
],
\"line\": 4,
@@ -835,7 +835,7 @@ exports[`test cases/filters.nested.input.json 1`] = `
\"attrs\": [],
\"line\": 7,
\"filename\": \"filters.nested.tokens.json\",
- \"val\": \"(function(){!function(){return console.log(\\\"test\\\")}()}).call(this);\"
+ \"val\": \"(function(){!function(){console.log(\\\"test\\\")}()}).call(this);\"
}
],
\"line\": 7,
@@ -844,7 +844,7 @@ exports[`test cases/filters.nested.input.json 1`] = `
\"attrs\": [],
\"line\": 7,
\"filename\": \"filters.nested.tokens.json\",
- \"val\": \"\"
+ \"val\": \"\"
}
],
\"line\": 6,
diff --git a/packages/pug/test/cases/filters.coffeescript.html b/packages/pug/test/cases/filters.coffeescript.html
index ceddb0cc8..739406132 100644
--- a/packages/pug/test/cases/filters.coffeescript.html
+++ b/packages/pug/test/cases/filters.coffeescript.html
@@ -1,8 +1,9 @@
-
\ No newline at end of file
+ (function(){}).call(this);
+
diff --git a/packages/pug/test/cases/filters.include.html b/packages/pug/test/cases/filters.include.html
index cc74456b5..1dc755ff5 100644
--- a/packages/pug/test/cases/filters.include.html
+++ b/packages/pug/test/cases/filters.include.html
@@ -1,9 +1,8 @@
Just some markdown tests.
-
With new line.
-
+
+
-
\ No newline at end of file
+
From ec18ece7a2e0eaec4a565153e6c5fb4238d03fe9 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Tue, 18 Apr 2017 01:36:22 +0100
Subject: [PATCH 04/96] Publish
- pug-filters@2.1.2
- pug-lexer@3.1.0
- pug-linker@2.0.3
- pug-load@2.0.6
- pug-walk@1.1.2
- pug@2.0.0-beta.12
---
packages/pug-filters/package.json | 8 ++++----
packages/pug-lexer/package.json | 2 +-
packages/pug-linker/package.json | 8 ++++----
packages/pug-load/package.json | 6 +++---
packages/pug-walk/package.json | 4 ++--
packages/pug/package.json | 10 +++++-----
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/packages/pug-filters/package.json b/packages/pug-filters/package.json
index 6298161b8..31cc51b6b 100644
--- a/packages/pug-filters/package.json
+++ b/packages/pug-filters/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-filters",
- "version": "2.1.1",
+ "version": "2.1.2",
"description": "Code for processing filters in pug templates",
"keywords": [
"pug"
@@ -9,7 +9,7 @@
"clean-css": "^3.3.0",
"constantinople": "^3.0.1",
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.1",
+ "pug-walk": "^1.1.2",
"jstransformer": "1.0.0",
"resolve": "^1.1.6",
"uglify-js": "^2.6.1"
@@ -22,8 +22,8 @@
"jstransformer-markdown-it": "^1.0.0",
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
- "pug-lexer": "^3.0.0",
- "pug-load": "^2.0.5",
+ "pug-lexer": "^3.1.0",
+ "pug-load": "^2.0.6",
"pug-parser": "^2.0.2"
},
"repository": {
diff --git a/packages/pug-lexer/package.json b/packages/pug-lexer/package.json
index f50c67d9c..063c606ac 100644
--- a/packages/pug-lexer/package.json
+++ b/packages/pug-lexer/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-lexer",
- "version": "3.0.0",
+ "version": "3.1.0",
"description": "The pug lexer (takes a string and converts it to an array of tokens)",
"keywords": [
"pug"
diff --git a/packages/pug-linker/package.json b/packages/pug-linker/package.json
index e09ec422e..fe4a831f8 100644
--- a/packages/pug-linker/package.json
+++ b/packages/pug-linker/package.json
@@ -1,17 +1,17 @@
{
"name": "pug-linker",
- "version": "2.0.2",
+ "version": "2.0.3",
"description": "Link multiple pug ASTs together using include/extends",
"keywords": [
"pug"
],
"dependencies": {
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.1"
+ "pug-walk": "^1.1.2"
},
"devDependencies": {
- "pug-lexer": "^3.0.0",
- "pug-load": "^2.0.5",
+ "pug-lexer": "^3.1.0",
+ "pug-load": "^2.0.6",
"pug-parser": "^2.0.2"
},
"repository": {
diff --git a/packages/pug-load/package.json b/packages/pug-load/package.json
index e74fa92d3..d3118869f 100644
--- a/packages/pug-load/package.json
+++ b/packages/pug-load/package.json
@@ -1,16 +1,16 @@
{
"name": "pug-load",
- "version": "2.0.5",
+ "version": "2.0.6",
"description": "The Pug loader is responsible for loading the depenendencies of a given Pug file.",
"keywords": [
"pug"
],
"dependencies": {
"object-assign": "^4.1.0",
- "pug-walk": "^1.1.1"
+ "pug-walk": "^1.1.2"
},
"devDependencies": {
- "pug-lexer": "^3.0.0",
+ "pug-lexer": "^3.1.0",
"pug-parser": "^2.0.2"
},
"repository": {
diff --git a/packages/pug-walk/package.json b/packages/pug-walk/package.json
index 74134c4c5..f3ba4b906 100644
--- a/packages/pug-walk/package.json
+++ b/packages/pug-walk/package.json
@@ -1,13 +1,13 @@
{
"name": "pug-walk",
- "version": "1.1.1",
+ "version": "1.1.2",
"description": "Walk and transform a pug AST",
"keywords": [
"pug"
],
"dependencies": {},
"devDependencies": {
- "pug-lexer": "^3.0.0",
+ "pug-lexer": "^3.1.0",
"pug-parser": "^2.0.2"
},
"files": [
diff --git a/packages/pug/package.json b/packages/pug/package.json
index 06192e24f..5c0ee2131 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -1,7 +1,7 @@
{
"name": "pug",
"description": "A clean, whitespace-sensitive template language for writing HTML",
- "version": "2.0.0-beta11",
+ "version": "2.0.0-beta.12",
"author": "TJ Holowaychuk ",
"maintainers": [
"Forbes Lindesay ",
@@ -21,10 +21,10 @@
"main": "lib",
"dependencies": {
"pug-code-gen": "^1.1.1",
- "pug-filters": "^2.1.1",
- "pug-lexer": "^3.0.0",
- "pug-linker": "^2.0.2",
- "pug-load": "^2.0.5",
+ "pug-filters": "^2.1.2",
+ "pug-lexer": "^3.1.0",
+ "pug-linker": "^2.0.3",
+ "pug-load": "^2.0.6",
"pug-parser": "^2.0.2",
"pug-runtime": "^2.0.3",
"pug-strip-comments": "^1.0.2"
From 5c704b26fa4cb26d9b35f64f1e3d07f13cdfd6b4 Mon Sep 17 00:00:00 2001
From: Kyle
Date: Thu, 27 Apr 2017 02:17:24 +0900
Subject: [PATCH 05/96] Unit test for #2404 Extends extending even when in if
block (#2743)
---
packages/pug/test/pug.test.js | 9 +++++++++
test/fixtures/issue-2404/default.pug | 2 ++
test/fixtures/issue-2404/mixin.call.extends.pug | 10 ++++++++++
3 files changed, 21 insertions(+)
create mode 100644 test/fixtures/issue-2404/default.pug
create mode 100644 test/fixtures/issue-2404/mixin.call.extends.pug
diff --git a/packages/pug/test/pug.test.js b/packages/pug/test/pug.test.js
index 608419d47..d0dadd1f5 100644
--- a/packages/pug/test/pug.test.js
+++ b/packages/pug/test/pug.test.js
@@ -890,6 +890,15 @@ describe('pug', function(){
it('does not produce warnings for issue-1593', function () {
pug.compileFile(__dirname + '/fixtures/issue-1593/index.pug');
});
+ it('does throw error for issue-2404', function () {
+ var message = '';
+ try {
+ pug.compileFile(__dirname + '/fixtures/issue-2404/mixin.call.extends.pug');
+ } catch (e) {
+ message = e.message;
+ }
+ assert(message.indexOf('Declaration of template inheritance ("extends") should be the first thing in the file.') !== -1);
+ });
it('should support caching (pass 1)', function () {
fs.writeFileSync(__dirname + '/temp/input-compileFile.pug', '.foo bar');
var fn = pug.compileFile(__dirname + '/temp/input-compileFile.pug',
diff --git a/test/fixtures/issue-2404/default.pug b/test/fixtures/issue-2404/default.pug
new file mode 100644
index 000000000..94ae27e0c
--- /dev/null
+++ b/test/fixtures/issue-2404/default.pug
@@ -0,0 +1,2 @@
+body
+ block content
diff --git a/test/fixtures/issue-2404/mixin.call.extends.pug b/test/fixtures/issue-2404/mixin.call.extends.pug
new file mode 100644
index 000000000..8064ff47d
--- /dev/null
+++ b/test/fixtures/issue-2404/mixin.call.extends.pug
@@ -0,0 +1,10 @@
+mixin content
+ if bar
+ extends default
+ block content
+ block
+ else
+ block
+
++content
+ h1 Hello!
From df7d66119413c16616195ddc3bac3a02505d4cff Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Wed, 26 Apr 2017 20:19:06 +0200
Subject: [PATCH 06/96] Fix test for extends not at top level and ensure second
extends always triggers an early exception (#2791)
---
packages/pug-linker/index.js | 4 ++--
.../test/__snapshots__/index.test.js.snap | 2 +-
.../test/extends-not-top-level}/default.pug | 0
.../test/extends-not-top-level/duplicate.pug | 2 ++
.../pug/test/extends-not-top-level/index.pug | 0
.../test/extends-not-top-level/index.test.js | 19 +++++++++++++++++++
packages/pug/test/pug.test.js | 9 ---------
7 files changed, 24 insertions(+), 12 deletions(-)
rename {test/fixtures/issue-2404 => packages/pug/test/extends-not-top-level}/default.pug (100%)
create mode 100644 packages/pug/test/extends-not-top-level/duplicate.pug
rename test/fixtures/issue-2404/mixin.call.extends.pug => packages/pug/test/extends-not-top-level/index.pug (100%)
create mode 100644 packages/pug/test/extends-not-top-level/index.test.js
diff --git a/packages/pug-linker/index.js b/packages/pug-linker/index.js
index 98cba5e4f..7e82003ed 100644
--- a/packages/pug-linker/index.js
+++ b/packages/pug-linker/index.js
@@ -13,10 +13,10 @@ function link(ast) {
var extendsNode = null;
if (ast.nodes.length) {
var hasExtends = ast.nodes[0].type === 'Extends';
+ checkExtendPosition(ast, hasExtends);
if (hasExtends) {
extendsNode = ast.nodes.shift();
}
- checkExtendPosition(ast, hasExtends);
}
ast = applyIncludes(ast);
ast.declaredBlocks = findDeclaredBlocks(ast);
@@ -164,7 +164,7 @@ function checkExtendPosition(ast, hasExtends) {
if (hasExtends && !legitExtendsReached) {
legitExtendsReached = true;
} else {
- error('EXTENDS_NOT_FIRST', 'Declaration of template inheritance ("extends") should be the first thing in the file.', node);
+ error('EXTENDS_NOT_FIRST', 'Declaration of template inheritance ("extends") should be the first thing in the file. There can only be one extends statement per file.', node);
}
}
});
diff --git a/packages/pug-linker/test/__snapshots__/index.test.js.snap b/packages/pug-linker/test/__snapshots__/index.test.js.snap
index 786f13182..a36cdebc8 100644
--- a/packages/pug-linker/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-linker/test/__snapshots__/index.test.js.snap
@@ -3570,7 +3570,7 @@ exports[`error handling extends-not-first.input.json 1`] = `
Object {
"code": "PUG:EXTENDS_NOT_FIRST",
"line": 4,
- "msg": "Declaration of template inheritance (\"extends\") should be the first thing in the file.",
+ "msg": "Declaration of template inheritance (\"extends\") should be the first thing in the file. There can only be one extends statement per file.",
}
`;
diff --git a/test/fixtures/issue-2404/default.pug b/packages/pug/test/extends-not-top-level/default.pug
similarity index 100%
rename from test/fixtures/issue-2404/default.pug
rename to packages/pug/test/extends-not-top-level/default.pug
diff --git a/packages/pug/test/extends-not-top-level/duplicate.pug b/packages/pug/test/extends-not-top-level/duplicate.pug
new file mode 100644
index 000000000..3786c4c55
--- /dev/null
+++ b/packages/pug/test/extends-not-top-level/duplicate.pug
@@ -0,0 +1,2 @@
+extends default
+extends default
diff --git a/test/fixtures/issue-2404/mixin.call.extends.pug b/packages/pug/test/extends-not-top-level/index.pug
similarity index 100%
rename from test/fixtures/issue-2404/mixin.call.extends.pug
rename to packages/pug/test/extends-not-top-level/index.pug
diff --git a/packages/pug/test/extends-not-top-level/index.test.js b/packages/pug/test/extends-not-top-level/index.test.js
new file mode 100644
index 000000000..43877a026
--- /dev/null
+++ b/packages/pug/test/extends-not-top-level/index.test.js
@@ -0,0 +1,19 @@
+const pug = require('../../');
+
+// regression test for #2404
+
+test('extends not top level should throw an error', () => {
+ expect(
+ () => pug.compileFile(
+ __dirname + '/index.pug'
+ )
+ ).toThrow('Declaration of template inheritance ("extends") should be the first thing in the file. There can only be one extends statement per file.');
+});
+
+test('duplicate extends should throw an error', () => {
+ expect(
+ () => pug.compileFile(
+ __dirname + '/duplicate.pug'
+ )
+ ).toThrow('Declaration of template inheritance ("extends") should be the first thing in the file. There can only be one extends statement per file.');
+});
diff --git a/packages/pug/test/pug.test.js b/packages/pug/test/pug.test.js
index d0dadd1f5..608419d47 100644
--- a/packages/pug/test/pug.test.js
+++ b/packages/pug/test/pug.test.js
@@ -890,15 +890,6 @@ describe('pug', function(){
it('does not produce warnings for issue-1593', function () {
pug.compileFile(__dirname + '/fixtures/issue-1593/index.pug');
});
- it('does throw error for issue-2404', function () {
- var message = '';
- try {
- pug.compileFile(__dirname + '/fixtures/issue-2404/mixin.call.extends.pug');
- } catch (e) {
- message = e.message;
- }
- assert(message.indexOf('Declaration of template inheritance ("extends") should be the first thing in the file.') !== -1);
- });
it('should support caching (pass 1)', function () {
fs.writeFileSync(__dirname + '/temp/input-compileFile.pug', '.foo bar');
var fn = pug.compileFile(__dirname + '/temp/input-compileFile.pug',
From 93097afb14ce3a8e8955a2e0f46dbb92aa45740f Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Tue, 2 May 2017 00:01:15 +0100
Subject: [PATCH 07/96] Remove named blocks from included templates if they
extend (#2792)
* Add regression tests for #2436
* Update snapshot to match user's typical expectations.
* Remove named blocks from included templates that extend
[fixes #2436]
---
packages/pug-linker/index.js | 17 +-
.../test/__snapshots__/index.test.js.snap | 200 ++----------------
.../__snapshots__/index.test.js.snap | 15 ++
.../pug/test/regression-2436/index.test.js | 17 ++
packages/pug/test/regression-2436/issue1.pug | 7 +
packages/pug/test/regression-2436/issue2.pug | 7 +
packages/pug/test/regression-2436/layout.pug | 6 +
packages/pug/test/regression-2436/other1.pug | 4 +
packages/pug/test/regression-2436/other2.pug | 4 +
.../pug/test/regression-2436/other_layout.pug | 4 +
10 files changed, 101 insertions(+), 180 deletions(-)
create mode 100644 packages/pug/test/regression-2436/__snapshots__/index.test.js.snap
create mode 100644 packages/pug/test/regression-2436/index.test.js
create mode 100644 packages/pug/test/regression-2436/issue1.pug
create mode 100644 packages/pug/test/regression-2436/issue2.pug
create mode 100644 packages/pug/test/regression-2436/layout.pug
create mode 100644 packages/pug/test/regression-2436/other1.pug
create mode 100644 packages/pug/test/regression-2436/other2.pug
create mode 100644 packages/pug/test/regression-2436/other_layout.pug
diff --git a/packages/pug-linker/index.js b/packages/pug-linker/index.js
index 7e82003ed..2d6d90255 100644
--- a/packages/pug-linker/index.js
+++ b/packages/pug-linker/index.js
@@ -55,6 +55,7 @@ function link(ast) {
parent.declaredBlocks[name] = ast.declaredBlocks[name];
});
parent.nodes = mixins.concat(parent.nodes);
+ parent.hasExtends = true;
return parent;
}
return ast;
@@ -123,7 +124,21 @@ function applyIncludes(ast, child) {
}
}, function after(node, replace) {
if (node.type === 'Include') {
- replace(applyYield(link(node.file.ast), node.block));
+ var childAST = link(node.file.ast);
+ if (childAST.hasExtends) {
+ childAST = removeBlocks(childAST);
+ }
+ replace(applyYield(childAST, node.block));
+ }
+ });
+}
+function removeBlocks(ast) {
+ return walk(ast, function (node, replace) {
+ if (node.type === 'NamedBlock') {
+ replace({
+ type: 'Block',
+ nodes: node.nodes
+ });
}
});
}
diff --git a/packages/pug-linker/test/__snapshots__/index.test.js.snap b/packages/pug-linker/test/__snapshots__/index.test.js.snap
index a36cdebc8..bfbf2f6bd 100644
--- a/packages/pug-linker/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-linker/test/__snapshots__/index.test.js.snap
@@ -370,60 +370,7 @@ Object {
exports[`cases from pug include-extends-from-root.input.json 1`] = `
Object {
- "declaredBlocks": Object {
- "content": Array [
- Object {
- "filename": "auxiliary/layout.pug",
- "line": 6,
- "mode": "replace",
- "name": "content",
- "nodes": Array [
- Object {
- "declaredBlocks": Object {},
- "filename": "auxiliary/include-from-root.pug",
- "line": 0,
- "nodes": Array [
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
- "filename": "auxiliary/include-from-root.pug",
- "line": 1,
- "nodes": Array [
- Object {
- "filename": "auxiliary/include-from-root.pug",
- "line": 1,
- "type": "Text",
- "val": "hello",
- },
- ],
- "type": "Block",
- },
- "filename": "auxiliary/include-from-root.pug",
- "isInline": false,
- "line": 1,
- "name": "h1",
- "selfClosing": false,
- "type": "Tag",
- },
- ],
- "type": "Block",
- },
- ],
- "type": "NamedBlock",
- },
- ],
- "head": Array [
- Object {
- "filename": "auxiliary/layout.pug",
- "line": 4,
- "mode": "replace",
- "name": "head",
- "nodes": Array [],
- "type": "NamedBlock",
- },
- ],
- },
+ "declaredBlocks": Object {},
"filename": "include-extends-from-root.pug",
"line": 0,
"nodes": Array [
@@ -525,6 +472,7 @@ Object {
],
},
"filename": "auxiliary/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -565,12 +513,8 @@ Object {
"type": "Tag",
},
Object {
- "filename": "auxiliary/layout.pug",
- "line": 4,
- "mode": "replace",
- "name": "head",
"nodes": Array [],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -590,10 +534,6 @@ Object {
"line": 5,
"nodes": Array [
Object {
- "filename": "auxiliary/layout.pug",
- "line": 6,
- "mode": "replace",
- "name": "content",
"nodes": Array [
Object {
"declaredBlocks": Object {},
@@ -627,7 +567,7 @@ Object {
"type": "Block",
},
],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -659,74 +599,7 @@ Object {
exports[`cases from pug include-extends-of-common-template.input.json 1`] = `
Object {
- "declaredBlocks": Object {
- "test": Array [
- Object {
- "filename": "auxiliary/empty-block.pug",
- "line": 1,
- "mode": "replace",
- "name": "test",
- "nodes": Array [
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
- "filename": "auxiliary/extends-empty-block-1.pug",
- "line": 4,
- "nodes": Array [
- Object {
- "filename": "auxiliary/extends-empty-block-1.pug",
- "line": 4,
- "type": "Text",
- "val": "test1",
- },
- ],
- "type": "Block",
- },
- "filename": "auxiliary/extends-empty-block-1.pug",
- "isInline": false,
- "line": 4,
- "name": "div",
- "selfClosing": false,
- "type": "Tag",
- },
- ],
- "type": "NamedBlock",
- },
- Object {
- "filename": "auxiliary/empty-block.pug",
- "line": 1,
- "mode": "replace",
- "name": "test",
- "nodes": Array [
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
- "filename": "auxiliary/extends-empty-block-2.pug",
- "line": 4,
- "nodes": Array [
- Object {
- "filename": "auxiliary/extends-empty-block-2.pug",
- "line": 4,
- "type": "Text",
- "val": "test2",
- },
- ],
- "type": "Block",
- },
- "filename": "auxiliary/extends-empty-block-2.pug",
- "isInline": false,
- "line": 4,
- "name": "div",
- "selfClosing": false,
- "type": "Tag",
- },
- ],
- "type": "NamedBlock",
- },
- ],
- },
+ "declaredBlocks": Object {},
"filename": "include-extends-of-common-template.pug",
"line": 0,
"nodes": Array [
@@ -802,13 +675,10 @@ Object {
],
},
"filename": "auxiliary/empty-block.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
- "filename": "auxiliary/empty-block.pug",
- "line": 1,
- "mode": "replace",
- "name": "test",
"nodes": Array [
Object {
"attributeBlocks": Array [],
@@ -834,7 +704,7 @@ Object {
"type": "Tag",
},
],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -911,13 +781,10 @@ Object {
],
},
"filename": "auxiliary/empty-block.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
- "filename": "auxiliary/empty-block.pug",
- "line": 1,
- "mode": "replace",
- "name": "test",
"nodes": Array [
Object {
"attributeBlocks": Array [],
@@ -943,7 +810,7 @@ Object {
"type": "Tag",
},
],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -955,33 +822,7 @@ Object {
exports[`cases from pug include-extends-relative.input.json 1`] = `
Object {
- "declaredBlocks": Object {
- "content": Array [
- Object {
- "filename": "../cases-src/auxiliary/layout.pug",
- "line": 6,
- "mode": "replace",
- "name": "content",
- "nodes": Array [
- Object {
- "type": "Text",
- "val": "h1 hello",
- },
- ],
- "type": "NamedBlock",
- },
- ],
- "head": Array [
- Object {
- "filename": "../cases-src/auxiliary/layout.pug",
- "line": 4,
- "mode": "replace",
- "name": "head",
- "nodes": Array [],
- "type": "NamedBlock",
- },
- ],
- },
+ "declaredBlocks": Object {},
"filename": "include-extends-relative.pug",
"line": 0,
"nodes": Array [
@@ -1029,6 +870,7 @@ Object {
],
},
"filename": "../cases-src/auxiliary/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -1069,12 +911,8 @@ Object {
"type": "Tag",
},
Object {
- "filename": "../cases-src/auxiliary/layout.pug",
- "line": 4,
- "mode": "replace",
- "name": "head",
"nodes": Array [],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -1094,17 +932,13 @@ Object {
"line": 5,
"nodes": Array [
Object {
- "filename": "../cases-src/auxiliary/layout.pug",
- "line": 6,
- "mode": "replace",
- "name": "content",
"nodes": Array [
Object {
"type": "Text",
"val": "h1 hello",
},
],
- "type": "NamedBlock",
+ "type": "Block",
},
],
"type": "Block",
@@ -1924,6 +1758,7 @@ Object {
],
},
"filename": "../fixtures/append/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -2228,6 +2063,7 @@ Object {
],
},
"filename": "../fixtures/append-without-block/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -2694,6 +2530,7 @@ Object {
],
},
"filename": "../fixtures/multi-append-prepend-block/root.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -3086,6 +2923,7 @@ Object {
],
},
"filename": "../fixtures/prepend/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -3390,6 +3228,7 @@ Object {
],
},
"filename": "../fixtures/prepend-without-block/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -3586,6 +3425,7 @@ exports[`special cases extending-empty.input.json 1`] = `
Object {
"declaredBlocks": Object {},
"filename": "../fixtures/empty.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [],
"type": "Block",
@@ -3681,6 +3521,7 @@ Object {
],
},
"filename": "../fixtures/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
@@ -3990,6 +3831,7 @@ Object {
],
},
"filename": "../fixtures/layout.pug",
+ "hasExtends": true,
"line": 0,
"nodes": Array [
Object {
diff --git a/packages/pug/test/regression-2436/__snapshots__/index.test.js.snap b/packages/pug/test/regression-2436/__snapshots__/index.test.js.snap
new file mode 100644
index 000000000..552bcdcdc
--- /dev/null
+++ b/packages/pug/test/regression-2436/__snapshots__/index.test.js.snap
@@ -0,0 +1,15 @@
+exports[`test #2436 - block with a same name extends from different layout in nesting 1`] = `
+"
+layout
+Main A
+other layout
+Other A
"
+`;
+
+exports[`test #2436 - block with a same name extends from the same layout in nesting 1`] = `
+"
+layout
+Main A
+layout
+Other A
"
+`;
diff --git a/packages/pug/test/regression-2436/index.test.js b/packages/pug/test/regression-2436/index.test.js
new file mode 100644
index 000000000..47a1ae44b
--- /dev/null
+++ b/packages/pug/test/regression-2436/index.test.js
@@ -0,0 +1,17 @@
+const pug = require('../../');
+
+test('#2436 - block with a same name extends from the same layout in nesting', () => {
+ const output = pug.renderFile(
+ __dirname + '/issue1.pug',
+ {pretty: true}
+ );
+ expect(output).toMatchSnapshot();
+});
+
+test('#2436 - block with a same name extends from different layout in nesting', () => {
+ const output = pug.renderFile(
+ __dirname + '/issue2.pug',
+ {pretty: true}
+ );
+ expect(output).toMatchSnapshot();
+});
diff --git a/packages/pug/test/regression-2436/issue1.pug b/packages/pug/test/regression-2436/issue1.pug
new file mode 100644
index 000000000..f521c6ea2
--- /dev/null
+++ b/packages/pug/test/regression-2436/issue1.pug
@@ -0,0 +1,7 @@
+extends layout.pug
+
+block a
+ p Main A
+
+block b
+ include other1.pug
diff --git a/packages/pug/test/regression-2436/issue2.pug b/packages/pug/test/regression-2436/issue2.pug
new file mode 100644
index 000000000..7acba598a
--- /dev/null
+++ b/packages/pug/test/regression-2436/issue2.pug
@@ -0,0 +1,7 @@
+extends layout.pug
+
+block a
+ p Main A
+
+block b
+ include other2.pug
diff --git a/packages/pug/test/regression-2436/layout.pug b/packages/pug/test/regression-2436/layout.pug
new file mode 100644
index 000000000..71ad7eb93
--- /dev/null
+++ b/packages/pug/test/regression-2436/layout.pug
@@ -0,0 +1,6 @@
+h1 layout
+
+block a
+ p block in layout
+
+block b
diff --git a/packages/pug/test/regression-2436/other1.pug b/packages/pug/test/regression-2436/other1.pug
new file mode 100644
index 000000000..206cb4fc9
--- /dev/null
+++ b/packages/pug/test/regression-2436/other1.pug
@@ -0,0 +1,4 @@
+extends layout.pug
+
+block a
+ p Other A
diff --git a/packages/pug/test/regression-2436/other2.pug b/packages/pug/test/regression-2436/other2.pug
new file mode 100644
index 000000000..6329aebb0
--- /dev/null
+++ b/packages/pug/test/regression-2436/other2.pug
@@ -0,0 +1,4 @@
+extends other_layout.pug
+
+block a
+ p Other A
diff --git a/packages/pug/test/regression-2436/other_layout.pug b/packages/pug/test/regression-2436/other_layout.pug
new file mode 100644
index 000000000..edda16157
--- /dev/null
+++ b/packages/pug/test/regression-2436/other_layout.pug
@@ -0,0 +1,4 @@
+h1 other layout
+
+block a
+ p block in other layout
From 29a73a52cb5f79cae33657178efb87039a279548 Mon Sep 17 00:00:00 2001
From: Andrew Bradley
Date: Mon, 1 May 2017 19:01:32 -0400
Subject: [PATCH 08/96] Fixes #2774: "shadowed" blocks can be properly replaced
/ appended / prepended (#2793)
* Normalize line endings on Windows
* Adds failing test for replacing shadowed blocks
* Fixes #2774: shadowed blocks in 3+-level layout heirarchies can be replaced/appended/prepended
Updates snapshots for new shadowed block behavior. When a block is
shadowed in an extending layout, node replacement / appending /
prepending is applied to the shadower block in addition to the parent,
shadowed block. This change is reflected in the snapshots.
---
.gitattributes | 1 +
packages/pug-linker/index.js | 3 +-
.../test/__snapshots__/index.test.js.snap | 136 ++++++++++++++++++
.../__snapshots__/index.test.js.snap | 3 +
packages/pug/test/shadowed-block/base.pug | 4 +
packages/pug/test/shadowed-block/index.pug | 4 +
.../pug/test/shadowed-block/index.test.js | 14 ++
packages/pug/test/shadowed-block/layout.pug | 6 +
8 files changed, 169 insertions(+), 2 deletions(-)
create mode 100644 .gitattributes
create mode 100644 packages/pug/test/shadowed-block/__snapshots__/index.test.js.snap
create mode 100644 packages/pug/test/shadowed-block/base.pug
create mode 100644 packages/pug/test/shadowed-block/index.pug
create mode 100644 packages/pug/test/shadowed-block/index.test.js
create mode 100644 packages/pug/test/shadowed-block/layout.pug
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..749ae8148
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/packages/pug-linker/index.js b/packages/pug-linker/index.js
index 2d6d90255..e7993e8f2 100644
--- a/packages/pug-linker/index.js
+++ b/packages/pug-linker/index.js
@@ -77,9 +77,8 @@ function flattenParentBlocks(parentBlocks, accumulator) {
parentBlocks.forEach(function (parentBlock) {
if (parentBlock.parents) {
flattenParentBlocks(parentBlock.parents, accumulator);
- } else {
- accumulator.push(parentBlock);
}
+ accumulator.push(parentBlock);
});
return accumulator;
}
diff --git a/packages/pug-linker/test/__snapshots__/index.test.js.snap b/packages/pug-linker/test/__snapshots__/index.test.js.snap
index bfbf2f6bd..5e64d97e5 100644
--- a/packages/pug-linker/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-linker/test/__snapshots__/index.test.js.snap
@@ -2242,6 +2242,74 @@ Object {
"mode": "replace",
"name": "content",
"nodes": Array [
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'last\'",
+ },
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'prepend\'",
+ },
+ ],
+ "block": Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 13,
+ "nodes": Array [
+ Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 13,
+ "type": "Text",
+ "val": "Last prepend must appear at top",
+ },
+ ],
+ "type": "Block",
+ },
+ "filename": "layout.multi.append.prepend.block.pug",
+ "isInline": false,
+ "line": 13,
+ "name": "p",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'first\'",
+ },
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'prepend\'",
+ },
+ ],
+ "block": Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 7,
+ "nodes": Array [
+ Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 7,
+ "type": "Text",
+ "val": "Something prepended to content",
+ },
+ ],
+ "type": "Block",
+ },
+ "filename": "layout.multi.append.prepend.block.pug",
+ "isInline": false,
+ "line": 7,
+ "name": "p",
+ "selfClosing": false,
+ "type": "Tag",
+ },
Object {
"attributeBlocks": Array [],
"attrs": Array [
@@ -2271,6 +2339,74 @@ Object {
"selfClosing": false,
"type": "Tag",
},
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'first\'",
+ },
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'append\'",
+ },
+ ],
+ "block": Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 4,
+ "nodes": Array [
+ Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 4,
+ "type": "Text",
+ "val": "Something appended to content",
+ },
+ ],
+ "type": "Block",
+ },
+ "filename": "layout.multi.append.prepend.block.pug",
+ "isInline": false,
+ "line": 4,
+ "name": "p",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'last\'",
+ },
+ Object {
+ "mustEscape": false,
+ "name": "class",
+ "val": "\'append\'",
+ },
+ ],
+ "block": Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 10,
+ "nodes": Array [
+ Object {
+ "filename": "layout.multi.append.prepend.block.pug",
+ "line": 10,
+ "type": "Text",
+ "val": "Last append must be most last",
+ },
+ ],
+ "type": "Block",
+ },
+ "filename": "layout.multi.append.prepend.block.pug",
+ "isInline": false,
+ "line": 10,
+ "name": "p",
+ "selfClosing": false,
+ "type": "Tag",
+ },
],
"parents": Array [
Object {
diff --git a/packages/pug/test/shadowed-block/__snapshots__/index.test.js.snap b/packages/pug/test/shadowed-block/__snapshots__/index.test.js.snap
new file mode 100644
index 000000000..c1446e484
--- /dev/null
+++ b/packages/pug/test/shadowed-block/__snapshots__/index.test.js.snap
@@ -0,0 +1,3 @@
+exports[`test layout with shadowed block 1`] = `""`;
+
+exports[`test layout with shadowed block 2`] = `""`;
diff --git a/packages/pug/test/shadowed-block/base.pug b/packages/pug/test/shadowed-block/base.pug
new file mode 100644
index 000000000..7148cac3b
--- /dev/null
+++ b/packages/pug/test/shadowed-block/base.pug
@@ -0,0 +1,4 @@
+block root
+ // base.pug: root
+ block shadowed
+ // base.pug: shadowed
diff --git a/packages/pug/test/shadowed-block/index.pug b/packages/pug/test/shadowed-block/index.pug
new file mode 100644
index 000000000..dabca487e
--- /dev/null
+++ b/packages/pug/test/shadowed-block/index.pug
@@ -0,0 +1,4 @@
+extends ./layout.pug
+
+block shadowed
+ // index.pug: shadowed
diff --git a/packages/pug/test/shadowed-block/index.test.js b/packages/pug/test/shadowed-block/index.test.js
new file mode 100644
index 000000000..82f82f416
--- /dev/null
+++ b/packages/pug/test/shadowed-block/index.test.js
@@ -0,0 +1,14 @@
+const pug = require('../../');
+
+test('layout with shadowed block', () => {
+ const outputWithAjax = pug.renderFile(
+ __dirname + '/index.pug',
+ {ajax: true}
+ );
+ const outputWithoutAjax = pug.renderFile(
+ __dirname + '/index.pug',
+ {ajax: false}
+ );
+ expect(outputWithAjax).toMatchSnapshot();
+ expect(outputWithoutAjax).toMatchSnapshot();
+});
diff --git a/packages/pug/test/shadowed-block/layout.pug b/packages/pug/test/shadowed-block/layout.pug
new file mode 100644
index 000000000..fa27d25d1
--- /dev/null
+++ b/packages/pug/test/shadowed-block/layout.pug
@@ -0,0 +1,6 @@
+extends ./base.pug
+
+block root
+ // layout.pug: root
+ block shadowed
+ // layout.pug: shadowed
From 474d4a3c092e14bd8793809457f7c422b9553041 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Tue, 2 May 2017 00:02:41 +0100
Subject: [PATCH 09/96] Publish
- pug-linker@3.0.0
- pug@2.0.0-rc.1
---
packages/pug-linker/package.json | 2 +-
packages/pug/package.json | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/pug-linker/package.json b/packages/pug-linker/package.json
index fe4a831f8..84141cfc5 100644
--- a/packages/pug-linker/package.json
+++ b/packages/pug-linker/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-linker",
- "version": "2.0.3",
+ "version": "3.0.0",
"description": "Link multiple pug ASTs together using include/extends",
"keywords": [
"pug"
diff --git a/packages/pug/package.json b/packages/pug/package.json
index 5c0ee2131..727179e72 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -1,7 +1,7 @@
{
"name": "pug",
"description": "A clean, whitespace-sensitive template language for writing HTML",
- "version": "2.0.0-beta.12",
+ "version": "2.0.0-rc.1",
"author": "TJ Holowaychuk ",
"maintainers": [
"Forbes Lindesay ",
@@ -23,7 +23,7 @@
"pug-code-gen": "^1.1.1",
"pug-filters": "^2.1.2",
"pug-lexer": "^3.1.0",
- "pug-linker": "^2.0.3",
+ "pug-linker": "^3.0.0",
"pug-load": "^2.0.6",
"pug-parser": "^2.0.2",
"pug-runtime": "^2.0.3",
From 897c7779fb53b7281be6cc9e61991281ee4be443 Mon Sep 17 00:00:00 2001
From: Mike
Date: Sat, 6 May 2017 02:54:54 +0200
Subject: [PATCH 10/96] Add compileFileModule method (#2761)
* add module option in compileClientWithDependenciesTracked
* add module export and require pug runtime behaviour in compile method
* add module option
* add test case for module syntax
* remove module option
* add test
* fix option name
* Require `inlineRuntimeFunctions` to be explicitly false
* Use expect and add snapshot
* snapshot
---
packages/pug/lib/index.js | 14 ++++++++--
.../pug/test/__snapshots__/pug.test.js.snap | 15 +++++++++++
packages/pug/test/pug.test.js | 27 +++++++++++++++----
3 files changed, 49 insertions(+), 7 deletions(-)
create mode 100644 packages/pug/test/__snapshots__/pug.test.js.snap
diff --git a/packages/pug/lib/index.js b/packages/pug/lib/index.js
index e8f0b48ac..a3c8968a5 100644
--- a/packages/pug/lib/index.js
+++ b/packages/pug/lib/index.js
@@ -276,6 +276,7 @@ exports.compile = function(str, options){
* the compiled template for better error messages.
* - `filename` used to improve errors when `compileDebug` is not `true` and to resolve imports/extends
* - `name` the name of the resulting function (defaults to "template")
+ * - `module` when it is explicitly `true`, the source code include export module syntax
*
* @param {String} str
* @param {Options} options
@@ -302,10 +303,19 @@ exports.compileClientWithDependenciesTracked = function(str, options){
filters: options.filters,
filterOptions: options.filterOptions,
filterAliases: options.filterAliases,
- plugins: options.plugins,
+ plugins: options.plugins
});
- return {body: parsed.body, dependencies: parsed.dependencies};
+ var body = parsed.body;
+
+ if(options.module) {
+ if(options.inlineRuntimeFunctions === false) {
+ body = 'var pug = require("pug-runtime");' + body;
+ }
+ body += ' module.exports = ' + (options.name || 'template') + ';';
+ }
+
+ return {body: body, dependencies: parsed.dependencies};
};
/**
diff --git a/packages/pug/test/__snapshots__/pug.test.js.snap b/packages/pug/test/__snapshots__/pug.test.js.snap
new file mode 100644
index 000000000..5ee3e8336
--- /dev/null
+++ b/packages/pug/test/__snapshots__/pug.test.js.snap
@@ -0,0 +1,15 @@
+exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it false 1`] = `
+"var pug = require(\"pug-runtime\");function template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var self = locals || {};;pug_debug_line = 1;
+pug_html = pug_html + \"\\u003Cdiv class=\\\"bar\\\"\\u003E\";
+;pug_debug_line = 1;
+pug_html = pug_html + (pug.escape(null == (pug_interp = self.foo) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";} catch (err) {pug.rethrow(err, pug_debug_filename, pug_debug_line);};return pug_html;} module.exports = template;"
+`;
+
+exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it true 1`] = `
+"function pug_escape(e){var a=\"\"+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s=\"\";for(r=t.index,c=0;r]/;
+function pug_rethrow(n,e,r,t){if(!(n instanceof Error))throw n;if(!(\"undefined\"==typeof window&&e||t))throw n.message+=\" on line \"+r,n;try{t=t||require(\"fs\").readFileSync(e,\"utf8\")}catch(e){pug_rethrow(n,null,r)}var i=3,a=t.split(\"\\n\"),o=Math.max(r-i,0),h=Math.min(a.length,r+i),i=a.slice(o,h).map(function(n,e){var t=e+o+1;return(t==r?\" > \":\" \")+t+\"| \"+n}).join(\"\\n\");throw n.path=e,n.message=(e||\"Pug\")+\":\"+r+\"\\n\"+i+\"\\n\\n\"+n.message,n}function template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var self = locals || {};;pug_debug_line = 1;
+pug_html = pug_html + \"\\u003Cdiv class=\\\"bar\\\"\\u003E\";
+;pug_debug_line = 1;
+pug_html = pug_html + (pug_escape(null == (pug_interp = self.foo) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";} catch (err) {pug_rethrow(err, pug_debug_filename, pug_debug_line);};return pug_html;} module.exports = template;"
+`;
diff --git a/packages/pug/test/pug.test.js b/packages/pug/test/pug.test.js
index 608419d47..4fb073ae3 100644
--- a/packages/pug/test/pug.test.js
+++ b/packages/pug/test/pug.test.js
@@ -970,20 +970,37 @@ describe('pug', function(){
});
describe('.compileClient()', function () {
- it('should support .pug.compileClient(str)', function () {
+ it('should support pug.compileClient(str)', function () {
var src = fs.readFileSync(__dirname + '/cases/basic.pug');
var expected = fs.readFileSync(__dirname + '/cases/basic.html', 'utf8').replace(/\s/g, '');
var fn = pug.compileClient(src);
fn = Function('pug', fn.toString() + '\nreturn template;')(pug.runtime);
var actual = fn({name: 'foo'}).replace(/\s/g, '');
- assert(actual === expected);
+ expect(actual).toBe(expected);
});
- it('should support .pug.compileClient(str, options)', function () {
- var src = '.bar= self.foo'
+ it('should support pug.compileClient(str, options)', function () {
+ var src = '.bar= self.foo';
var fn = pug.compileClient(src, {self: true});
fn = Function('pug', fn.toString() + '\nreturn template;')(pug.runtime);
var actual = fn({foo: 'baz'});
- assert(actual === 'baz
');
+ expect(actual).toBe('baz
');
+ });
+ it('should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it true', function () {
+ var src = '.bar= self.foo';
+ var fn = pug.compileClient(src, {self: true, module: true, inlineRuntimeFunctions: true});
+ expect(fn).toMatchSnapshot();
+ fs.writeFileSync(__dirname + '/temp/input-compileModuleFileClient.js', fn);
+ var expected = 'baz
';
+ var fn = require(__dirname + '/temp/input-compileModuleFileClient.js');
+ expect(fn({foo: 'baz'})).toBe('baz
');
+ });
+ it('should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it false', function () {
+ var src = '.bar= self.foo';
+ var fn = pug.compileClient(src, {self: true, module: true, inlineRuntimeFunctions: false});
+ expect(fn).toMatchSnapshot();
+ fs.writeFileSync(__dirname + '/temp/input-compileModuleFileClient.js', fn);
+ var fn = require(__dirname + '/temp/input-compileModuleFileClient.js');
+ expect(fn({foo: 'baz'})).toBe('baz
');
});
});
From ce24764124b2e22c927690f8d0b8af2c1ee33a9b Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Sat, 6 May 2017 02:15:28 +0100
Subject: [PATCH 11/96] Use prettier for JavaScript snapshots (#2797)
---
package.json | 12 ++-
.../pug/test/__snapshots__/pug.test.js.snap | 98 +++++++++++++++++--
scripts/prettier-javascript-serializer.js | 21 ++++
3 files changed, 117 insertions(+), 14 deletions(-)
create mode 100644 scripts/prettier-javascript-serializer.js
diff --git a/package.json b/package.json
index 0fa9d5e6d..b6eea874f 100644
--- a/package.json
+++ b/package.json
@@ -4,11 +4,12 @@
"devDependencies": {
"coveralls": "^2.11.2",
"jest": "^18.1.0",
- "lerna": "2.0.0-beta.32"
+ "lerna": "2.0.0-beta.32",
+ "prettier": "^1.3.1"
},
"repository": {
- "type": "git",
- "url": "https://github.com/pugjs/pug.git"
+ "type": "git",
+ "url": "https://github.com/pugjs/pug.git"
},
"scripts": {
"clean": "lerna clean",
@@ -22,7 +23,10 @@
},
"jest": {
"testEnvironment": "node",
- "snapshotSerializers": ["./scripts/filename-serializer.js"]
+ "snapshotSerializers": [
+ "./scripts/filename-serializer.js",
+ "./scripts/prettier-javascript-serializer.js"
+ ]
},
"license": "MIT"
}
diff --git a/packages/pug/test/__snapshots__/pug.test.js.snap b/packages/pug/test/__snapshots__/pug.test.js.snap
index 5ee3e8336..c7c4f1f29 100644
--- a/packages/pug/test/__snapshots__/pug.test.js.snap
+++ b/packages/pug/test/__snapshots__/pug.test.js.snap
@@ -1,15 +1,93 @@
exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it false 1`] = `
-"var pug = require(\"pug-runtime\");function template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var self = locals || {};;pug_debug_line = 1;
-pug_html = pug_html + \"\\u003Cdiv class=\\\"bar\\\"\\u003E\";
-;pug_debug_line = 1;
-pug_html = pug_html + (pug.escape(null == (pug_interp = self.foo) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";} catch (err) {pug.rethrow(err, pug_debug_filename, pug_debug_line);};return pug_html;} module.exports = template;"
+"var pug = require(\"pug-runtime\");
+function template(locals) {
+ var pug_html = \"\", pug_mixins = {}, pug_interp;
+ var pug_debug_filename, pug_debug_line;
+ try {
+ var self = locals || {};
+ pug_debug_line = 1;
+ pug_html = pug_html + \'\\u003Cdiv class=\"bar\"\\u003E\';
+ pug_debug_line = 1;
+ pug_html =
+ pug_html +
+ pug.escape(null == (pug_interp = self.foo) ? \"\" : pug_interp) +
+ \"\\u003C\\u002Fdiv\\u003E\";
+ } catch (err) {
+ pug.rethrow(err, pug_debug_filename, pug_debug_line);
+ }
+ return pug_html;
+}
+module.exports = template;
+"
`;
exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it true 1`] = `
-"function pug_escape(e){var a=\"\"+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s=\"\";for(r=t.index,c=0;r]/;
-function pug_rethrow(n,e,r,t){if(!(n instanceof Error))throw n;if(!(\"undefined\"==typeof window&&e||t))throw n.message+=\" on line \"+r,n;try{t=t||require(\"fs\").readFileSync(e,\"utf8\")}catch(e){pug_rethrow(n,null,r)}var i=3,a=t.split(\"\\n\"),o=Math.max(r-i,0),h=Math.min(a.length,r+i),i=a.slice(o,h).map(function(n,e){var t=e+o+1;return(t==r?\" > \":\" \")+t+\"| \"+n}).join(\"\\n\");throw n.path=e,n.message=(e||\"Pug\")+\":\"+r+\"\\n\"+i+\"\\n\\n\"+n.message,n}function template(locals) {var pug_html = \"\", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var self = locals || {};;pug_debug_line = 1;
-pug_html = pug_html + \"\\u003Cdiv class=\\\"bar\\\"\\u003E\";
-;pug_debug_line = 1;
-pug_html = pug_html + (pug_escape(null == (pug_interp = self.foo) ? \"\" : pug_interp)) + \"\\u003C\\u002Fdiv\\u003E\";} catch (err) {pug_rethrow(err, pug_debug_filename, pug_debug_line);};return pug_html;} module.exports = template;"
+"function pug_escape(e) {
+ var a = \"\" + e, t = pug_match_html.exec(a);
+ if (!t) return e;
+ var r, c, n, s = \"\";
+ for ((r = t.index), (c = 0); r < a.length; r++) {
+ switch (a.charCodeAt(r)) {
+ case 34:
+ n = \""\";
+ break;
+ case 38:
+ n = \"&\";
+ break;
+ case 60:
+ n = \"<\";
+ break;
+ case 62:
+ n = \">\";
+ break;
+ default:
+ continue;
+ }
+ c !== r && (s += a.substring(c, r)), (c = r + 1), (s += n);
+ }
+ return c !== r ? s + a.substring(c, r) : s;
+}
+var pug_match_html = /[\"&<>]/;
+function pug_rethrow(n, e, r, t) {
+ if (!(n instanceof Error)) throw n;
+ if (!((\"undefined\" == typeof window && e) || t))
+ throw ((n.message += \" on line \" + r), n);
+ try {
+ t = t || require(\"fs\").readFileSync(e, \"utf8\");
+ } catch (e) {
+ pug_rethrow(n, null, r);
+ }
+ var i = 3,
+ a = t.split(\"\\n\"),
+ o = Math.max(r - i, 0),
+ h = Math.min(a.length, r + i),
+ i = a
+ .slice(o, h)
+ .map(function(n, e) {
+ var t = e + o + 1;
+ return (t == r ? \" > \" : \" \") + t + \"| \" + n;
+ })
+ .join(\"\\n\");
+ throw ((n.path = e), (n.message =
+ (e || \"Pug\") + \":\" + r + \"\\n\" + i + \"\\n\\n\" + n.message), n);
+}
+function template(locals) {
+ var pug_html = \"\", pug_mixins = {}, pug_interp;
+ var pug_debug_filename, pug_debug_line;
+ try {
+ var self = locals || {};
+ pug_debug_line = 1;
+ pug_html = pug_html + \'\\u003Cdiv class=\"bar\"\\u003E\';
+ pug_debug_line = 1;
+ pug_html =
+ pug_html +
+ pug_escape(null == (pug_interp = self.foo) ? \"\" : pug_interp) +
+ \"\\u003C\\u002Fdiv\\u003E\";
+ } catch (err) {
+ pug_rethrow(err, pug_debug_filename, pug_debug_line);
+ }
+ return pug_html;
+}
+module.exports = template;
+"
`;
diff --git a/scripts/prettier-javascript-serializer.js b/scripts/prettier-javascript-serializer.js
new file mode 100644
index 000000000..4a0630a22
--- /dev/null
+++ b/scripts/prettier-javascript-serializer.js
@@ -0,0 +1,21 @@
+const prettier = require('prettier');
+
+const prettierOptions = {} // optional
+
+// filename serializer that removes the basedir
+module.exports = {
+ test: function(val) {
+ try {
+ return (
+ typeof val === 'string' &&
+ /function /.test(val) &&
+ val !== prettier.format(val, prettierOptions)
+ );
+ } catch (ex) {
+ return false;
+ }
+ },
+ print: function(val, serialize, indent) {
+ return serialize(prettier.format(val, prettierOptions));
+ }
+};
From 319c9af71e43c9bd829798f9a9432cdc396b37d3 Mon Sep 17 00:00:00 2001
From: Matin Tamizi
Date: Fri, 2 Jun 2017 01:02:37 -0700
Subject: [PATCH 12/96] More recent Python implementation (#2810)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 4336e359b..5be0da332 100644
--- a/README.md
+++ b/README.md
@@ -148,7 +148,7 @@ Implementations in other languages:
- [php](https://github.com/pug-php/pug)
- [scala](https://scalate.github.io/scalate/documentation/scaml-reference.html)
- [ruby](https://github.com/slim-template/slim)
- - [python](https://github.com/SyrusAkbary/pyjade)
+ - [python](https://github.com/matannoam/pypugjs)
- [java](https://github.com/neuland/jade4j)
Other:
From 5bf0a65331ecec7566b961e7b1f45e693815b283 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Fri, 2 Jun 2017 13:31:55 +0100
Subject: [PATCH 13/96] [pug-parser] Remove excess blocks (#2812)
This has a tiny effect on the output of the pretty printed mode, but
mostly it just simplifies rendering for third things like react-pug.
---
packages/pug-parser/index.js | 20 +-
.../test/__snapshots__/index.test.js.snap | 774 ++++++++----------
.../no-unnecessary-blocks.test.js.snap | 38 +
.../test/no-unnecessary-blocks.test.js | 14 +
packages/pug/package.json | 2 +-
packages/pug/test/cases/text.html | 6 +-
6 files changed, 430 insertions(+), 424 deletions(-)
create mode 100644 packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
create mode 100644 packages/pug-parser/test/no-unnecessary-blocks.test.js
diff --git a/packages/pug-parser/index.js b/packages/pug-parser/index.js
index 818ee7fcf..863e7aeec 100644
--- a/packages/pug-parser/index.js
+++ b/packages/pug-parser/index.js
@@ -110,7 +110,13 @@ Parser.prototype = {
block.nodes = block.nodes.concat(this.parseTextHtml());
} else {
var expr = this.parseExpr();
- if (expr) block.nodes.push(expr);
+ if (expr) {
+ if (expr.type === 'Block') {
+ block.nodes = block.nodes.concat(expr.nodes);
+ } else {
+ block.nodes.push(expr);
+ }
+ }
}
}
@@ -382,7 +388,8 @@ loop:
parseBlockExpansion: function(){
var tok = this.accept(':');
if (tok) {
- return this.initBlock(tok.line, [this.parseExpr()]);
+ const expr = this.parseExpr();
+ return expr.type === 'Block' ? expr : this.initBlock(tok.line, [expr]);
} else {
return this.block();
}
@@ -928,7 +935,11 @@ loop:
block.nodes = block.nodes.concat(this.parseTextHtml());
} else {
var expr = this.parseExpr();
- block.nodes.push(expr);
+ if (expr.type === 'Block') {
+ block.nodes = block.nodes.concat(expr.nodes);
+ } else {
+ block.nodes.push(expr);
+ }
}
}
this.expect('outdent');
@@ -1044,7 +1055,8 @@ loop:
break;
case ':':
this.advance();
- tag.block = this.initBlock(tag.line, [this.parseExpr()]);
+ const expr = this.parseExpr();
+ tag.block = expr.type === 'Block' ? expr : this.initBlock(tag.line, [expr]);
break;
case 'newline':
case 'indent':
diff --git a/packages/pug-parser/test/__snapshots__/index.test.js.snap b/packages/pug-parser/test/__snapshots__/index.test.js.snap
index 80d361002..4044b29d6 100644
--- a/packages/pug-parser/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/index.test.js.snap
@@ -7097,17 +7097,10 @@ Object {
"nodes": Array [
Object {
"filename": "html.tokens.json",
+ "isHtml": true,
"line": 13,
- "nodes": Array [
- Object {
- "filename": "html.tokens.json",
- "isHtml": true,
- "line": 13,
- "type": "Text",
- "val": "Even as the body of a block expansion.",
- },
- ],
- "type": "Block",
+ "type": "Text",
+ "val": "Even as the body of a block expansion.",
},
],
"type": "Block",
@@ -9087,143 +9080,136 @@ Object {
Object {
"filename": "inline-tag.tokens.json",
"line": 11,
- "nodes": Array [
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 11,
- "type": "Text",
- "val": "bing",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 12,
- "type": "Text",
- "val": "
+ "type": "Text",
+ "val": "bing",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 12,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 12,
- "type": "Text",
- "val": "",
- },
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 12,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [],
+ "block": Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 12,
+ "nodes": Array [
+ Object {
"filename": "inline-tag.tokens.json",
"line": 12,
- "nodes": Array [
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 12,
- "type": "Text",
- "val": "foo",
- },
- ],
- "type": "Block",
+ "type": "Text",
+ "val": "foo",
},
- "filename": "inline-tag.tokens.json",
- "isInline": true,
- "line": 12,
- "name": "strong",
- "selfClosing": false,
- "type": "Tag",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 12,
- "type": "Text",
- "val": "",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 13,
- "type": "Text",
- "val": "
+ ],
+ "type": "Block",
+ },
+ "filename": "inline-tag.tokens.json",
+ "isInline": true,
+ "line": 12,
+ "name": "strong",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 12,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 13,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 13,
- "type": "Text",
- "val": "",
- },
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 13,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [],
+ "block": Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 13,
+ "nodes": Array [
+ Object {
+ "buffer": true,
"filename": "inline-tag.tokens.json",
+ "isInline": true,
"line": 13,
- "nodes": Array [
- Object {
- "buffer": true,
- "filename": "inline-tag.tokens.json",
- "isInline": true,
- "line": 13,
- "mustEscape": true,
- "type": "Code",
- "val": "\'[foo]\'",
- },
- ],
- "type": "Block",
+ "mustEscape": true,
+ "type": "Code",
+ "val": "\'[foo]\'",
},
- "filename": "inline-tag.tokens.json",
- "isInline": true,
- "line": 13,
- "name": "strong",
- "selfClosing": false,
- "type": "Tag",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 13,
- "type": "Text",
- "val": "",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 14,
- "type": "Text",
- "val": "
+ ],
+ "type": "Block",
+ },
+ "filename": "inline-tag.tokens.json",
+ "isInline": true,
+ "line": 13,
+ "name": "strong",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 13,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 14,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 14,
- "type": "Text",
- "val": "",
- },
- Object {
- "buffer": false,
- "filename": "inline-tag.tokens.json",
- "isInline": false,
- "line": 14,
- "mustEscape": false,
- "type": "Code",
- "val": "var foo = \'foo]\'",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 14,
- "type": "Text",
- "val": "",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 15,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 14,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "buffer": false,
+ "filename": "inline-tag.tokens.json",
+ "isInline": false,
+ "line": 14,
+ "mustEscape": false,
+ "type": "Code",
+ "val": "var foo = \'foo]\'",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 14,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 15,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "inline-tag.tokens.json",
- "line": 15,
- "type": "Text",
- "val": "bong",
- },
- ],
- "type": "Block",
+ },
+ Object {
+ "filename": "inline-tag.tokens.json",
+ "line": 15,
+ "type": "Text",
+ "val": "bong",
},
],
"type": "Block",
@@ -9630,70 +9616,63 @@ Object {
Object {
"filename": "interpolation.escape.tokens.json",
"line": 4,
- "nodes": Array [
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 4,
- "type": "Text",
- "val": "some",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 5,
- "type": "Text",
- "val": "
-",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 5,
- "type": "Text",
- "val": "#{text}",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 6,
- "type": "Text",
- "val": "
-",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 6,
- "type": "Text",
- "val": "here",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 7,
- "type": "Text",
- "val": "
+ "type": "Text",
+ "val": "some",
+ },
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 5,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "interpolation.escape.tokens.json",
- "line": 7,
- "type": "Text",
- "val": "My ID ",
- },
- Object {
- "buffer": true,
- "filename": "interpolation.escape.tokens.json",
- "isInline": true,
- "line": 7,
- "mustEscape": true,
- "type": "Code",
- "val": "\"is {\" + id + \"}\"",
- },
- ],
- "type": "Block",
},
- ],
- "type": "Block",
- },
- "filename": "interpolation.escape.tokens.json",
- "isInline": false,
- "line": 3,
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 5,
+ "type": "Text",
+ "val": "#{text}",
+ },
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 6,
+ "type": "Text",
+ "val": "
+",
+ },
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 6,
+ "type": "Text",
+ "val": "here",
+ },
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 7,
+ "type": "Text",
+ "val": "
+",
+ },
+ Object {
+ "filename": "interpolation.escape.tokens.json",
+ "line": 7,
+ "type": "Text",
+ "val": "My ID ",
+ },
+ Object {
+ "buffer": true,
+ "filename": "interpolation.escape.tokens.json",
+ "isInline": true,
+ "line": 7,
+ "mustEscape": true,
+ "type": "Code",
+ "val": "\"is {\" + id + \"}\"",
+ },
+ ],
+ "type": "Block",
+ },
+ "filename": "interpolation.escape.tokens.json",
+ "isInline": false,
+ "line": 3,
"name": "foo",
"selfClosing": false,
"type": "Tag",
@@ -15300,47 +15279,40 @@ Object {
Object {
"filename": "tag-blocks.tokens.json",
"line": 3,
- "nodes": Array [
- Object {
- "filename": "tag-blocks.tokens.json",
- "line": 3,
- "type": "Text",
- "val": "We have sent an e-mail to ",
- },
- Object {
- "attributeBlocks": Array [],
- "attrs": Array [],
- "block": Object {
+ "type": "Text",
+ "val": "We have sent an e-mail to ",
+ },
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [],
+ "block": Object {
+ "filename": "tag-blocks.tokens.json",
+ "line": 3,
+ "nodes": Array [
+ Object {
+ "buffer": true,
"filename": "tag-blocks.tokens.json",
+ "isInline": true,
"line": 3,
- "nodes": Array [
- Object {
- "buffer": true,
- "filename": "tag-blocks.tokens.json",
- "isInline": true,
- "line": 3,
- "mustEscape": true,
- "type": "Code",
- "val": "this.props.email",
- },
- ],
- "type": "Block",
+ "mustEscape": true,
+ "type": "Code",
+ "val": "this.props.email",
},
- "filename": "tag-blocks.tokens.json",
- "isInline": true,
- "line": 3,
- "name": "strong",
- "selfClosing": false,
- "type": "Tag",
- },
- Object {
- "filename": "tag-blocks.tokens.json",
- "line": 3,
- "type": "Text",
- "val": ". Please click the link in the e-mail",
- },
- ],
- "type": "Block",
+ ],
+ "type": "Block",
+ },
+ "filename": "tag-blocks.tokens.json",
+ "isInline": true,
+ "line": 3,
+ "name": "strong",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ Object {
+ "filename": "tag-blocks.tokens.json",
+ "line": 3,
+ "type": "Text",
+ "val": ". Please click the link in the e-mail",
},
Object {
"buffer": true,
@@ -15919,41 +15891,34 @@ Object {
Object {
"filename": "text.tokens.json",
"line": 8,
- "nodes": Array [
- Object {
- "filename": "text.tokens.json",
- "line": 8,
- "type": "Text",
- "val": "foo",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 9,
- "type": "Text",
- "val": "
+ "type": "Text",
+ "val": "foo",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 9,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 9,
- "type": "Text",
- "val": "bar",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 10,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 9,
+ "type": "Text",
+ "val": "bar",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 10,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 10,
- "type": "Text",
- "val": "baz",
- },
- ],
- "type": "Block",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 10,
+ "type": "Text",
+ "val": "baz",
},
],
"type": "Block",
@@ -16044,71 +16009,64 @@ Object {
"type": "Tag",
},
Object {
- "filename": "text.tokens.json",
- "line": 21,
- "nodes": Array [
- Object {
- "line": 22,
- "type": "Text",
- "val": "foo",
- },
- Object {
- "line": 23,
- "type": "Text",
- "val": "
+ "line": 22,
+ "type": "Text",
+ "val": "foo",
+ },
+ Object {
+ "line": 23,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 23,
- "type": "Text",
- "val": "",
- },
- Object {
- "line": 24,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 23,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "line": 24,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 24,
- "type": "Text",
- "val": "",
- },
- Object {
- "line": 25,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 24,
+ "type": "Text",
+ "val": "",
+ },
+ Object {
+ "line": 25,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 25,
- "type": "Text",
- "val": "bar",
- },
- Object {
- "line": 26,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 25,
+ "type": "Text",
+ "val": "bar",
+ },
+ Object {
+ "line": 26,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 26,
- "type": "Text",
- "val": "baz",
- },
- Object {
- "line": 27,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 26,
+ "type": "Text",
+ "val": "baz",
+ },
+ Object {
+ "line": 27,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 27,
- "type": "Text",
- "val": "",
- },
- ],
- "type": "Block",
+ },
+ Object {
+ "line": 27,
+ "type": "Text",
+ "val": "",
},
Object {
"attributeBlocks": Array [],
@@ -16120,54 +16078,47 @@ Object {
Object {
"filename": "text.tokens.json",
"line": 29,
- "nodes": Array [
- Object {
- "filename": "text.tokens.json",
- "line": 29,
- "type": "Text",
- "val": "foo",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 30,
- "type": "Text",
- "val": "
+ "type": "Text",
+ "val": "foo",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 30,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 30,
- "type": "Text",
- "val": " bar",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 31,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 30,
+ "type": "Text",
+ "val": " bar",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 31,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 31,
- "type": "Text",
- "val": " baz",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 32,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 31,
+ "type": "Text",
+ "val": " baz",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 32,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "filename": "text.tokens.json",
- "line": 32,
- "type": "Text",
- "val": ".",
- },
- ],
- "type": "Block",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 32,
+ "type": "Text",
+ "val": ".",
},
],
"type": "Block",
@@ -16247,49 +16198,42 @@ Object {
"type": "Tag",
},
Object {
- "filename": "text.tokens.json",
- "line": 40,
- "nodes": Array [
- Object {
- "line": 41,
- "type": "Text",
- "val": "foo",
- },
- Object {
- "line": 42,
- "type": "Text",
- "val": "
+ "line": 41,
+ "type": "Text",
+ "val": "foo",
+ },
+ Object {
+ "line": 42,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 42,
- "type": "Text",
- "val": " bar",
- },
- Object {
- "line": 43,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 42,
+ "type": "Text",
+ "val": " bar",
+ },
+ Object {
+ "line": 43,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 43,
- "type": "Text",
- "val": " baz",
- },
- Object {
- "line": 44,
- "type": "Text",
- "val": "
+ },
+ Object {
+ "line": 43,
+ "type": "Text",
+ "val": " baz",
+ },
+ Object {
+ "line": 44,
+ "type": "Text",
+ "val": "
",
- },
- Object {
- "line": 44,
- "type": "Text",
- "val": ".",
- },
- ],
- "type": "Block",
+ },
+ Object {
+ "line": 44,
+ "type": "Text",
+ "val": ".",
},
],
"type": "Block",
diff --git a/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap b/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
new file mode 100644
index 000000000..0d1576139
--- /dev/null
+++ b/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
@@ -0,0 +1,38 @@
+exports[`test no uncessessary blocks should be added 1`] = `
+Object {
+ "line": 0,
+ "nodes": Array [
+ Object {
+ "attributeBlocks": Array [],
+ "attrs": Array [],
+ "block": Object {
+ "line": 2,
+ "nodes": Array [
+ Object {
+ "line": 3,
+ "type": "Text",
+ "val": "Hello",
+ },
+ Object {
+ "line": 4,
+ "type": "Text",
+ "val": "\n",
+ },
+ Object {
+ "line": 4,
+ "type": "Text",
+ "val": "World",
+ },
+ ],
+ "type": "Block",
+ },
+ "isInline": false,
+ "line": 2,
+ "name": "div",
+ "selfClosing": false,
+ "type": "Tag",
+ },
+ ],
+ "type": "Block",
+}
+`;
diff --git a/packages/pug-parser/test/no-unnecessary-blocks.test.js b/packages/pug-parser/test/no-unnecessary-blocks.test.js
new file mode 100644
index 000000000..30b5c7df4
--- /dev/null
+++ b/packages/pug-parser/test/no-unnecessary-blocks.test.js
@@ -0,0 +1,14 @@
+'use strict';
+
+var lex = require('pug-lexer');
+var parse = require('../');
+
+const input = `
+div
+ | Hello
+ | World
+`
+
+test('no uncessessary blocks should be added', () => {
+ expect(parse(lex(input))).toMatchSnapshot();
+});
diff --git a/packages/pug/package.json b/packages/pug/package.json
index 727179e72..c65c63b2a 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -39,7 +39,7 @@
"jstransformer-verbatim": "^1.0.0",
"mkdirp": "^0.5.1",
"rimraf": "^2.2.8",
- "uglify-js": "mishoo/UglifyJS2#1c15d0db456ce32f1b9b507aad97e5ee5c8285f7"
+ "uglify-js": "github:mishoo/UglifyJS2#1c15d0db456ce32f1b9b507aad97e5ee5c8285f7"
},
"browser": {
"fs": false
diff --git a/packages/pug/test/cases/text.html b/packages/pug/test/cases/text.html
index 6f0161570..0b0efb05c 100644
--- a/packages/pug/test/cases/text.html
+++ b/packages/pug/test/cases/text.html
@@ -16,8 +16,7 @@
bar
baz
-
-foo
+foo
bar
@@ -31,8 +30,7 @@
bar
baz
.
-
-foo
+foo
bar
baz
.
From 851c634afe9b44029f3e3fd3f164a80b2bf7ce21 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Fri, 2 Jun 2017 13:33:27 +0100
Subject: [PATCH 14/96] Publish
- pug-filters@2.1.3
- pug-linker@3.0.1
- pug-load@2.0.7
- pug-parser@3.0.0
- pug-walk@1.1.3
- pug@2.0.0-rc.2
---
packages/pug-filters/package.json | 8 ++++----
packages/pug-linker/package.json | 8 ++++----
packages/pug-load/package.json | 6 +++---
packages/pug-parser/package.json | 2 +-
packages/pug-walk/package.json | 4 ++--
packages/pug/package.json | 10 +++++-----
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/packages/pug-filters/package.json b/packages/pug-filters/package.json
index 31cc51b6b..4ed6b2998 100644
--- a/packages/pug-filters/package.json
+++ b/packages/pug-filters/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-filters",
- "version": "2.1.2",
+ "version": "2.1.3",
"description": "Code for processing filters in pug templates",
"keywords": [
"pug"
@@ -9,7 +9,7 @@
"clean-css": "^3.3.0",
"constantinople": "^3.0.1",
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.2",
+ "pug-walk": "^1.1.3",
"jstransformer": "1.0.0",
"resolve": "^1.1.6",
"uglify-js": "^2.6.1"
@@ -23,8 +23,8 @@
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.6",
- "pug-parser": "^2.0.2"
+ "pug-load": "^2.0.7",
+ "pug-parser": "^3.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-linker/package.json b/packages/pug-linker/package.json
index 84141cfc5..bb2ac7e2c 100644
--- a/packages/pug-linker/package.json
+++ b/packages/pug-linker/package.json
@@ -1,18 +1,18 @@
{
"name": "pug-linker",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Link multiple pug ASTs together using include/extends",
"keywords": [
"pug"
],
"dependencies": {
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.2"
+ "pug-walk": "^1.1.3"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.6",
- "pug-parser": "^2.0.2"
+ "pug-load": "^2.0.7",
+ "pug-parser": "^3.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-load/package.json b/packages/pug-load/package.json
index d3118869f..5bae9db8c 100644
--- a/packages/pug-load/package.json
+++ b/packages/pug-load/package.json
@@ -1,17 +1,17 @@
{
"name": "pug-load",
- "version": "2.0.6",
+ "version": "2.0.7",
"description": "The Pug loader is responsible for loading the depenendencies of a given Pug file.",
"keywords": [
"pug"
],
"dependencies": {
"object-assign": "^4.1.0",
- "pug-walk": "^1.1.2"
+ "pug-walk": "^1.1.3"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^2.0.2"
+ "pug-parser": "^3.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-parser/package.json b/packages/pug-parser/package.json
index 94912893f..c8a5e3daf 100644
--- a/packages/pug-parser/package.json
+++ b/packages/pug-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-parser",
- "version": "2.0.2",
+ "version": "3.0.0",
"description": "The pug parser (takes an array of tokens and converts it to an abstract syntax tree)",
"keywords": [
"pug"
diff --git a/packages/pug-walk/package.json b/packages/pug-walk/package.json
index f3ba4b906..4550c8e56 100644
--- a/packages/pug-walk/package.json
+++ b/packages/pug-walk/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-walk",
- "version": "1.1.2",
+ "version": "1.1.3",
"description": "Walk and transform a pug AST",
"keywords": [
"pug"
@@ -8,7 +8,7 @@
"dependencies": {},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^2.0.2"
+ "pug-parser": "^3.0.0"
},
"files": [
"index.js"
diff --git a/packages/pug/package.json b/packages/pug/package.json
index c65c63b2a..515bc7fbd 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -1,7 +1,7 @@
{
"name": "pug",
"description": "A clean, whitespace-sensitive template language for writing HTML",
- "version": "2.0.0-rc.1",
+ "version": "2.0.0-rc.2",
"author": "TJ Holowaychuk ",
"maintainers": [
"Forbes Lindesay ",
@@ -21,11 +21,11 @@
"main": "lib",
"dependencies": {
"pug-code-gen": "^1.1.1",
- "pug-filters": "^2.1.2",
+ "pug-filters": "^2.1.3",
"pug-lexer": "^3.1.0",
- "pug-linker": "^3.0.0",
- "pug-load": "^2.0.6",
- "pug-parser": "^2.0.2",
+ "pug-linker": "^3.0.1",
+ "pug-load": "^2.0.7",
+ "pug-parser": "^3.0.0",
"pug-runtime": "^2.0.3",
"pug-strip-comments": "^1.0.2"
},
From cf436ab808369a30973b425aafd55af872b31744 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Mon, 19 Jun 2017 23:31:16 +0100
Subject: [PATCH 15/96] Create ISSUE_TEMPLATE.md
---
.github/ISSUE_TEMPLATE.md | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 .github/ISSUE_TEMPLATE.md
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000..46a71f43f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,40 @@
+
+
+
+
+**Pug Version:** your version number here
+
+**Node Vesrion:** your version number here
+
+## Input JavaScript Values
+
+```js
+pug.renderFile('input.pug', {
+ whatIsIt: 'language',
+});
+```
+
+## Input Pug
+
+```pug
+h1 I Love Pug
+p It's a great #{whatIsIt}
+```
+
+## Expected HTML
+
+```html
+I Love Pug
+It's a great language
+```
+
+## Actual HTML
+
+```html
+I Love Pug
+It's a great language
+```
+
+## Additional Comments
+
+
From 54b28caa404edfedb8ea3d94fe18008c64bc6dff Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Mon, 19 Jun 2017 23:51:33 +0100
Subject: [PATCH 16/96] Update tests for new prettier version
---
.../pug/test/__snapshots__/pug.test.js.snap | 25 +++++++++++++------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/packages/pug/test/__snapshots__/pug.test.js.snap b/packages/pug/test/__snapshots__/pug.test.js.snap
index c7c4f1f29..1d90c354a 100644
--- a/packages/pug/test/__snapshots__/pug.test.js.snap
+++ b/packages/pug/test/__snapshots__/pug.test.js.snap
@@ -1,7 +1,9 @@
exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it false 1`] = `
"var pug = require(\"pug-runtime\");
function template(locals) {
- var pug_html = \"\", pug_mixins = {}, pug_interp;
+ var pug_html = \"\",
+ pug_mixins = {},
+ pug_interp;
var pug_debug_filename, pug_debug_line;
try {
var self = locals || {};
@@ -23,10 +25,14 @@ module.exports = template;
exports[`pug .compileClient() should support module syntax in pug.compileClient(str, options) when inlineRuntimeFunctions it true 1`] = `
"function pug_escape(e) {
- var a = \"\" + e, t = pug_match_html.exec(a);
+ var a = \"\" + e,
+ t = pug_match_html.exec(a);
if (!t) return e;
- var r, c, n, s = \"\";
- for ((r = t.index), (c = 0); r < a.length; r++) {
+ var r,
+ c,
+ n,
+ s = \"\";
+ for (r = t.index, c = 0; r < a.length; r++) {
switch (a.charCodeAt(r)) {
case 34:
n = \""\";
@@ -68,11 +74,16 @@ function pug_rethrow(n, e, r, t) {
return (t == r ? \" > \" : \" \") + t + \"| \" + n;
})
.join(\"\\n\");
- throw ((n.path = e), (n.message =
- (e || \"Pug\") + \":\" + r + \"\\n\" + i + \"\\n\\n\" + n.message), n);
+ throw (
+ (n.path = e),
+ (n.message = (e || \"Pug\") + \":\" + r + \"\\n\" + i + \"\\n\\n\" + n.message),
+ n
+ );
}
function template(locals) {
- var pug_html = \"\", pug_mixins = {}, pug_interp;
+ var pug_html = \"\",
+ pug_mixins = {},
+ pug_interp;
var pug_debug_filename, pug_debug_line;
try {
var self = locals || {};
From f4298ad2a70295e7965bc41659584151a2f9a2e8 Mon Sep 17 00:00:00 2001
From: Ryuma Yoshida
Date: Mon, 3 Jul 2017 11:18:19 +0900
Subject: [PATCH 17/96] Add Node.js v8 to Travis CI (#2836)
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 201e3ad85..63814d8db 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,7 @@ language: node_js
node_js:
- "4"
- "6"
+ - "8"
# Use faster Docker architecture on Travis.
sudo: false
From e9dbadd0b392dce56bcb0b75aafff9e9dd90ed96 Mon Sep 17 00:00:00 2001
From: flamedoge
Date: Sun, 2 Jul 2017 22:30:35 -0400
Subject: [PATCH 18/96] replace const with var for use with 'strict' (#2827)
Some applications with older node fails due to strict not allowing 'const' or 'let' keywords.
---
packages/pug-parser/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/pug-parser/index.js b/packages/pug-parser/index.js
index 863e7aeec..274eef87c 100644
--- a/packages/pug-parser/index.js
+++ b/packages/pug-parser/index.js
@@ -388,7 +388,7 @@ loop:
parseBlockExpansion: function(){
var tok = this.accept(':');
if (tok) {
- const expr = this.parseExpr();
+ var expr = this.parseExpr();
return expr.type === 'Block' ? expr : this.initBlock(tok.line, [expr]);
} else {
return this.block();
@@ -1055,7 +1055,7 @@ loop:
break;
case ':':
this.advance();
- const expr = this.parseExpr();
+ var expr = this.parseExpr();
tag.block = expr.type === 'Block' ? expr : this.initBlock(tag.line, [expr]);
break;
case 'newline':
From 84a530d7c7347a0e1bcaaab61d99f048041df22d Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Tue, 1 Aug 2017 16:53:41 +0100
Subject: [PATCH 19/96] Publish
- pug-filters@2.1.4
- pug-linker@3.0.2
- pug-load@2.0.8
- pug-parser@3.0.1
- pug-walk@1.1.4
- pug@2.0.0-rc.3
---
packages/pug-filters/package.json | 8 ++++----
packages/pug-linker/package.json | 8 ++++----
packages/pug-load/package.json | 6 +++---
packages/pug-parser/package.json | 2 +-
packages/pug-walk/package.json | 4 ++--
packages/pug/package.json | 10 +++++-----
6 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/packages/pug-filters/package.json b/packages/pug-filters/package.json
index 4ed6b2998..7163e4eaa 100644
--- a/packages/pug-filters/package.json
+++ b/packages/pug-filters/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-filters",
- "version": "2.1.3",
+ "version": "2.1.4",
"description": "Code for processing filters in pug templates",
"keywords": [
"pug"
@@ -9,7 +9,7 @@
"clean-css": "^3.3.0",
"constantinople": "^3.0.1",
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.3",
+ "pug-walk": "^1.1.4",
"jstransformer": "1.0.0",
"resolve": "^1.1.6",
"uglify-js": "^2.6.1"
@@ -23,8 +23,8 @@
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.7",
- "pug-parser": "^3.0.0"
+ "pug-load": "^2.0.8",
+ "pug-parser": "^3.0.1"
},
"repository": {
"type": "git",
diff --git a/packages/pug-linker/package.json b/packages/pug-linker/package.json
index bb2ac7e2c..6a4a7df8c 100644
--- a/packages/pug-linker/package.json
+++ b/packages/pug-linker/package.json
@@ -1,18 +1,18 @@
{
"name": "pug-linker",
- "version": "3.0.1",
+ "version": "3.0.2",
"description": "Link multiple pug ASTs together using include/extends",
"keywords": [
"pug"
],
"dependencies": {
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.3"
+ "pug-walk": "^1.1.4"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.7",
- "pug-parser": "^3.0.0"
+ "pug-load": "^2.0.8",
+ "pug-parser": "^3.0.1"
},
"repository": {
"type": "git",
diff --git a/packages/pug-load/package.json b/packages/pug-load/package.json
index 5bae9db8c..c0e7e3c31 100644
--- a/packages/pug-load/package.json
+++ b/packages/pug-load/package.json
@@ -1,17 +1,17 @@
{
"name": "pug-load",
- "version": "2.0.7",
+ "version": "2.0.8",
"description": "The Pug loader is responsible for loading the depenendencies of a given Pug file.",
"keywords": [
"pug"
],
"dependencies": {
"object-assign": "^4.1.0",
- "pug-walk": "^1.1.3"
+ "pug-walk": "^1.1.4"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^3.0.0"
+ "pug-parser": "^3.0.1"
},
"repository": {
"type": "git",
diff --git a/packages/pug-parser/package.json b/packages/pug-parser/package.json
index c8a5e3daf..a70d04178 100644
--- a/packages/pug-parser/package.json
+++ b/packages/pug-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-parser",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "The pug parser (takes an array of tokens and converts it to an abstract syntax tree)",
"keywords": [
"pug"
diff --git a/packages/pug-walk/package.json b/packages/pug-walk/package.json
index 4550c8e56..5bfe16ee8 100644
--- a/packages/pug-walk/package.json
+++ b/packages/pug-walk/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-walk",
- "version": "1.1.3",
+ "version": "1.1.4",
"description": "Walk and transform a pug AST",
"keywords": [
"pug"
@@ -8,7 +8,7 @@
"dependencies": {},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^3.0.0"
+ "pug-parser": "^3.0.1"
},
"files": [
"index.js"
diff --git a/packages/pug/package.json b/packages/pug/package.json
index 515bc7fbd..4fcc931bc 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -1,7 +1,7 @@
{
"name": "pug",
"description": "A clean, whitespace-sensitive template language for writing HTML",
- "version": "2.0.0-rc.2",
+ "version": "2.0.0-rc.3",
"author": "TJ Holowaychuk ",
"maintainers": [
"Forbes Lindesay ",
@@ -21,11 +21,11 @@
"main": "lib",
"dependencies": {
"pug-code-gen": "^1.1.1",
- "pug-filters": "^2.1.3",
+ "pug-filters": "^2.1.4",
"pug-lexer": "^3.1.0",
- "pug-linker": "^3.0.1",
- "pug-load": "^2.0.7",
- "pug-parser": "^3.0.0",
+ "pug-linker": "^3.0.2",
+ "pug-load": "^2.0.8",
+ "pug-parser": "^3.0.1",
"pug-runtime": "^2.0.3",
"pug-strip-comments": "^1.0.2"
},
From dc54da333c9316c0d7ffc09b71a32eff220c57bf Mon Sep 17 00:00:00 2001
From: Mitchell van Manen
Date: Tue, 1 Aug 2017 18:05:29 +0200
Subject: [PATCH 20/96] Added ASP.NET Core implementation (#2848)
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 5be0da332..d425a3961 100644
--- a/README.md
+++ b/README.md
@@ -150,6 +150,7 @@ Implementations in other languages:
- [ruby](https://github.com/slim-template/slim)
- [python](https://github.com/matannoam/pypugjs)
- [java](https://github.com/neuland/jade4j)
+ - [C# ASP.NET Core](https://github.com/AspNetMonsters/pugzor)
Other:
From fd97a0e6437c919db44254cfaba0721d24c6439d Mon Sep 17 00:00:00 2001
From: Joel Gallant
Date: Wed, 6 Sep 2017 08:06:47 -0600
Subject: [PATCH 21/96] Fixes typo in .github/ISSUE_TEMPLATE.md (#2852)
---
.github/ISSUE_TEMPLATE.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 46a71f43f..91c7522f8 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -4,7 +4,7 @@
**Pug Version:** your version number here
-**Node Vesrion:** your version number here
+**Node Version:** your version number here
## Input JavaScript Values
From 51437cee9332de107d54dc9936fb8df2bf5a5870 Mon Sep 17 00:00:00 2001
From: Akihiko Odaki
Date: Wed, 6 Sep 2017 23:15:41 +0900
Subject: [PATCH 22/96] Keep newline between text and interpolated-code (#2853)
---
packages/pug-parser/index.js | 3 ++-
.../test/__snapshots__/index.test.js.snap | 22 +++++++++++++++++++
.../pug-parser/test/cases/text.tokens.json | 6 ++++-
3 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/packages/pug-parser/index.js b/packages/pug-parser/index.js
index 274eef87c..5d8db7a0f 100644
--- a/packages/pug-parser/index.js
+++ b/packages/pug-parser/index.js
@@ -304,7 +304,8 @@ Parser.prototype = {
case 'newline':
if (!options || !options.block) break loop;
var tok = this.advance();
- if (this.peek().type === 'text') {
+ var nextType = this.peek().type;
+ if (nextType === 'text' || nextType === 'interpolated-code') {
tags.push({
type: 'Text',
val: '\n',
diff --git a/packages/pug-parser/test/__snapshots__/index.test.js.snap b/packages/pug-parser/test/__snapshots__/index.test.js.snap
index 4044b29d6..432b53533 100644
--- a/packages/pug-parser/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/index.test.js.snap
@@ -16235,6 +16235,28 @@ Object {
"type": "Text",
"val": ".",
},
+ Object {
+ "filename": "text.tokens.json",
+ "line": 45,
+ "type": "Text",
+ "val": "foo",
+ },
+ Object {
+ "filename": "text.tokens.json",
+ "line": 46,
+ "type": "Text",
+ "val": "
+",
+ },
+ Object {
+ "buffer": true,
+ "filename": "text.tokens.json",
+ "isInline": true,
+ "line": 46,
+ "mustEscape": true,
+ "type": "Code",
+ "val": "bar",
+ },
],
"type": "Block",
}
diff --git a/packages/pug-parser/test/cases/text.tokens.json b/packages/pug-parser/test/cases/text.tokens.json
index fe38e52aa..50553de04 100644
--- a/packages/pug-parser/test/cases/text.tokens.json
+++ b/packages/pug-parser/test/cases/text.tokens.json
@@ -84,4 +84,8 @@
{"type":"newline","line":44,"col":1}
{"type":"text","line":44,"col":3,"val":"."}
{"type":"end-pipeless-text","line":44,"col":4}
-{"type":"eos","line":44,"col":4}
\ No newline at end of file
+{"type":"newline","line":45,"col": 1}
+{"type":"text","line":45,"col": 3,"val":"foo"}
+{"type":"newline","line":46,"col": 1}
+{"type":"interpolated-code","line":46,"col":3,"val":"bar","mustEscape":true,"buffer":true}
+{"type":"eos","line":46,"col":9}
From 4182ad67ff425989aa4249a929d3f32e89af2bd6 Mon Sep 17 00:00:00 2001
From: droooney
Date: Wed, 6 Sep 2017 19:32:33 +0500
Subject: [PATCH 23/96] Add column field to ast nodes; make attributeBlocks an
array of nodes (#2834). (#2843)
---
packages/pug-code-gen/index.js | 17 +-
.../__snapshots__/filter-aliases.test.js.snap | 40 +-
...ons-applied-to-nested-filters.test.js.snap | 13 +
.../test/__snapshots__/index.test.js.snap | 14 +
packages/pug-parser/README.md | 4 +
packages/pug-parser/index.js | 92 +-
.../test/__snapshots__/index.test.js.snap | 2483 ++++++++++++++++-
.../no-unnecessary-blocks.test.js.snap | 7 +-
packages/pug-parser/try.js | 29 +
packages/pug-walk/test/index.test.js | 17 +-
10 files changed, 2679 insertions(+), 37 deletions(-)
create mode 100644 packages/pug-parser/try.js
diff --git a/packages/pug-code-gen/index.js b/packages/pug-code-gen/index.js
index 74dfcd080..9f578ef79 100644
--- a/packages/pug-code-gen/index.js
+++ b/packages/pug-code-gen/index.js
@@ -91,6 +91,7 @@ Compiler.prototype = {
error: function (message, code, node) {
var err = makeError(code, message, {
line: node.line,
+ column: node.column,
filename: node.filename,
});
throw err;
@@ -424,7 +425,7 @@ Compiler.prototype = {
var args = mixin.args || '';
var block = mixin.block;
var attrs = mixin.attrs;
- var attrsBlocks = mixin.attributeBlocks && mixin.attributeBlocks.slice();
+ var attrsBlocks = this.attributeBlocks(mixin.attributeBlocks);
var pp = this.pp;
var dynamic = mixin.name[0]==='#';
var key = mixin.name;
@@ -543,7 +544,7 @@ Compiler.prototype = {
if (tag.selfClosing || (!this.xml && selfClosing[tag.name])) {
this.buffer('<');
bufferName();
- this.visitAttributes(tag.attrs, tag.attributeBlocks.slice());
+ this.visitAttributes(tag.attrs, this.attributeBlocks(tag.attributeBlocks));
if (this.terse && !tag.selfClosing) {
this.buffer('>');
} else {
@@ -562,7 +563,7 @@ Compiler.prototype = {
// Optimize attributes buffering
this.buffer('<');
bufferName();
- this.visitAttributes(tag.attrs, tag.attributeBlocks.slice());
+ this.visitAttributes(tag.attrs, this.attributeBlocks(tag.attributeBlocks));
this.buffer('>');
if (tag.code) this.visitCode(tag.code);
this.visit(tag.block, tag);
@@ -803,6 +804,16 @@ Compiler.prototype = {
this.bufferExpression(res);
}
return res;
+ },
+
+ /**
+ * Compile attribute blocks.
+ */
+
+ attributeBlocks(attributeBlocks) {
+ return attributeBlocks && attributeBlocks.slice().map(function(attrBlock){
+ return attrBlock.val;
+ });
}
};
diff --git a/packages/pug-filters/test/__snapshots__/filter-aliases.test.js.snap b/packages/pug-filters/test/__snapshots__/filter-aliases.test.js.snap
index 640cc8634..2130c6572 100644
--- a/packages/pug-filters/test/__snapshots__/filter-aliases.test.js.snap
+++ b/packages/pug-filters/test/__snapshots__/filter-aliases.test.js.snap
@@ -23,28 +23,38 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 4,
"type": "Text",
"val": "function myFunc(foo) {",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 5,
"type": "Text",
"val": " return foo;",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 6,
"type": "Text",
"val": "}",
@@ -52,6 +62,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 3,
"name": "minify",
@@ -61,6 +72,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 3,
"name": "cdata",
@@ -70,6 +82,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"isInline": false,
"line": 2,
@@ -107,28 +120,38 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 4,
"type": "Text",
"val": "function myFunc(foo) {",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 5,
"type": "Text",
"val": " return foo;",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 6,
"type": "Text",
"val": "}",
@@ -136,6 +159,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 3,
"name": "minify",
@@ -147,6 +171,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 3,
"name": "cdata",
@@ -168,28 +193,38 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 8,
"type": "Text",
"val": "function myFunc(foo) {",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 9,
"type": "Text",
"val": " return foo;",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 10,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 10,
"type": "Text",
"val": "}",
@@ -197,6 +232,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 7,
"name": "uglify-js",
@@ -206,6 +242,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"line": 7,
"name": "cdata",
@@ -215,6 +252,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "/packages/pug-filters/test/filter-aliases.test.js",
"isInline": false,
"line": 2,
@@ -230,7 +268,7 @@ Object {
exports[`test we do not support chains of aliases 1`] = `
Object {
"code": "PUG:FILTER_ALISE_CHAIN",
- "message": "/packages/pug-filters/test/filter-aliases.test.js:3
+ "message": "/packages/pug-filters/test/filter-aliases.test.js:3:9
The filter \"minify-js\" is an alias for \"minify\", which is an alias for \"uglify-js\". Pug does not support chains of filter aliases.",
}
diff --git a/packages/pug-filters/test/__snapshots__/per-filter-options-applied-to-nested-filters.test.js.snap b/packages/pug-filters/test/__snapshots__/per-filter-options-applied-to-nested-filters.test.js.snap
index 579ad111a..c64988ced 100644
--- a/packages/pug-filters/test/__snapshots__/per-filter-options-applied-to-nested-filters.test.js.snap
+++ b/packages/pug-filters/test/__snapshots__/per-filter-options-applied-to-nested-filters.test.js.snap
@@ -23,28 +23,38 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 4,
"type": "Text",
"val": "function myFunc(foo) {",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 5,
"type": "Text",
"val": " return foo;",
},
Object {
+ "column": 1,
+ "filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 6,
"type": "Text",
"val": "}",
@@ -52,6 +62,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 3,
"name": "uglify-js",
@@ -63,6 +74,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"line": 3,
"name": "cdata",
@@ -74,6 +86,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "/packages/pug-filters/test/per-filter-options-applied-to-nested-filters.test.js",
"isInline": false,
"line": 2,
diff --git a/packages/pug-load/test/__snapshots__/index.test.js.snap b/packages/pug-load/test/__snapshots__/index.test.js.snap
index 5df1e4bee..f7168dcbc 100644
--- a/packages/pug-load/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-load/test/__snapshots__/index.test.js.snap
@@ -4,12 +4,14 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
"ast": Object {
"filename": "/bar.pug",
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "/bar.pug",
"line": 1,
"mode": "replace",
@@ -20,6 +22,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "/foo.pug",
"fullPath": "/bar.pug",
"line": 1,
@@ -33,6 +36,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "/foo.pug",
"line": 3,
"mode": "replace",
@@ -45,6 +49,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"file": Object {
"ast": Object {
"filename": "/bing.pug",
@@ -54,6 +59,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 1,
+ "filename": "/packages/pug-load/test/bing.pug",
+ "line": 1,
"mustEscape": false,
"name": "class",
"val": "\'bing\'",
@@ -64,6 +72,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 7,
"filename": "/bing.pug",
"line": 1,
"type": "Text",
@@ -72,6 +81,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "/bing.pug",
"isInline": false,
"line": 1,
@@ -82,6 +92,7 @@ Object {
],
"type": "Block",
},
+ "column": 11,
"filename": "/foo.pug",
"fullPath": "/bing.pug",
"line": 4,
@@ -102,7 +113,9 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 5,
"file": Object {
+ "column": 13,
"filename": "/foo.pug",
"fullPath": "/script.js",
"line": 6,
@@ -119,6 +132,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "/foo.pug",
"isInline": false,
"line": 5,
diff --git a/packages/pug-parser/README.md b/packages/pug-parser/README.md
index 33b8a2b84..628e6dbd4 100644
--- a/packages/pug-parser/README.md
+++ b/packages/pug-parser/README.md
@@ -56,12 +56,16 @@ console.log(JSON.stringify(ast, null, ' '))
{
"name": "data-foo",
"val": "\"bar\"",
+ "line": 1,
+ "column": 5,
+ "filename": "my-file.pug",
"mustEscape": true
}
],
"attributeBlocks": [],
"isInline": false,
"line": 1,
+ "column": 1,
"filename": "my-file.pug"
}
],
diff --git a/packages/pug-parser/index.js b/packages/pug-parser/index.js
index 5d8db7a0f..fe93b92e9 100644
--- a/packages/pug-parser/index.js
+++ b/packages/pug-parser/index.js
@@ -254,6 +254,7 @@ Parser.prototype = {
type: 'tag',
val: 'div',
line: this.peek().line,
+ col: this.peek().col,
filename: this.filename
});
return this.parseExpr();
@@ -286,6 +287,7 @@ Parser.prototype = {
type: 'Text',
val: tok.val,
line: tok.line,
+ column: tok.col,
filename: this.filename
});
break;
@@ -298,6 +300,7 @@ Parser.prototype = {
mustEscape: tok.mustEscape !== false,
isInline: true,
line: tok.line,
+ column: tok.col,
filename: this.filename
});
break;
@@ -310,6 +313,7 @@ Parser.prototype = {
type: 'Text',
val: '\n',
line: tok.line,
+ column: tok.col,
filename: this.filename
});
}
@@ -344,6 +348,7 @@ loop:
val: text.val,
filename: this.filename,
line: text.line,
+ column: text.col,
isHtml: true
};
nodes.push(currentNode);
@@ -402,7 +407,13 @@ loop:
parseCase: function(){
var tok = this.expect('case');
- var node = {type: 'Case', expr: tok.val, line: tok.line, filename: this.filename};
+ var node = {
+ type: 'Case',
+ expr: tok.val,
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ };
var block = this.emptyBlock(tok.line + 1);
this.expect('indent');
@@ -445,6 +456,7 @@ loop:
block: this.parseBlockExpansion(),
debug: false,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
} else {
@@ -453,6 +465,7 @@ loop:
expr: tok.val,
debug: false,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
}
@@ -470,6 +483,7 @@ loop:
block: this.parseBlockExpansion(),
debug: false,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
},
@@ -488,6 +502,7 @@ loop:
mustEscape: tok.mustEscape !== false,
isInline: !!noBlock,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
// todo: why is this here? It seems like a hacky workaround
@@ -516,6 +531,7 @@ loop:
consequent: this.emptyBlock(tok.line),
alternate: null,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
@@ -537,6 +553,7 @@ loop:
consequent: this.emptyBlock(tok.line),
alternate: null,
line: tok.line,
+ column: tok.col,
filename: this.filename
}
);
@@ -562,6 +579,7 @@ loop:
type: 'While',
test: tok.val,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
@@ -580,13 +598,15 @@ loop:
*/
parseBlockCode: function(){
- var line = this.expect('blockcode').line;
+ var tok = this.expect('blockcode');
+ var line = tok.line;
+ var column = tok.col;
var body = this.peek();
var text = '';
if (body.type === 'start-pipeless-text') {
this.advance();
while (this.peek().type !== 'end-pipeless-text') {
- var tok = this.advance();
+ tok = this.advance();
switch (tok.type) {
case 'text':
text += tok.val;
@@ -612,6 +632,7 @@ loop:
mustEscape: false,
isInline: false,
line: line,
+ column: column,
filename: this.filename
};
},
@@ -629,6 +650,7 @@ loop:
block: block,
buffer: tok.buffer,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
} else {
@@ -637,6 +659,7 @@ loop:
val: tok.val,
buffer: tok.buffer,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
}
@@ -652,6 +675,7 @@ loop:
type: 'Doctype',
val: tok.val,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
},
@@ -669,6 +693,7 @@ loop:
name: tok.val,
attrs: attrs,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
},
@@ -692,6 +717,7 @@ loop:
type: 'Text',
val: textToken.val,
line: textToken.line,
+ column: textToken.col,
filename: this.filename
}
]);
@@ -707,6 +733,7 @@ loop:
block: block,
attrs: attrs,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
},
@@ -724,6 +751,7 @@ loop:
key: tok.key,
block: this.block(),
line: tok.line,
+ column: tok.col,
filename: this.filename
};
if (this.peek().type == 'else') {
@@ -745,10 +773,12 @@ loop:
file: {
type: 'FileReference',
path: path.val.trim(),
- line: tok.line,
+ line: path.line,
+ column: path.col,
filename: this.filename
},
line: tok.line,
+ column: tok.col,
filename: this.filename
};
},
@@ -765,6 +795,7 @@ loop:
node.name = tok.val.trim();
node.mode = tok.mode;
node.line = tok.line;
+ node.column = tok.col;
return node;
},
@@ -774,12 +805,22 @@ loop:
if (!this.inMixin) {
this.error('BLOCK_OUTISDE_MIXIN', 'Anonymous blocks are not allowed unless they are part of a mixin.', tok);
}
- return {type: 'MixinBlock', line: tok.line, filename: this.filename};
+ return {
+ type: 'MixinBlock',
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ };
},
parseYield: function() {
var tok = this.expect('yield');
- return {type: 'YieldBlock', line: tok.line, filename: this.filename};
+ return {
+ type: 'YieldBlock',
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ };
},
/**
@@ -792,10 +833,10 @@ loop:
type: 'Include',
file: {
type: 'FileReference',
- line: tok.line,
filename: this.filename
},
line: tok.line,
+ column: tok.col,
filename: this.filename
};
var filters = [];
@@ -805,6 +846,8 @@ loop:
var path = this.expect('path');
node.file.path = path.val.trim();
+ node.file.line = path.line;
+ node.file.column = path.col;
if ((/\.jade$/.test(node.file.path) || /\.pug$/.test(node.file.path)) && !filters.length) {
node.block = 'indent' == this.peek().type ? this.block() : this.emptyBlock(tok.line);
@@ -841,6 +884,7 @@ loop:
attrs: [],
attributeBlocks: [],
line: tok.line,
+ column: tok.col,
filename: this.filename
};
@@ -871,6 +915,7 @@ loop:
block: this.block(),
call: false,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
this.inMixin--;
@@ -892,10 +937,22 @@ loop:
var tok = this.advance();
switch (tok.type) {
case 'text':
- block.nodes.push({type: 'Text', val: tok.val, line: tok.line});
+ block.nodes.push({
+ type: 'Text',
+ val: tok.val,
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ });
break;
case 'newline':
- block.nodes.push({type: 'Text', val: '\n', line: tok.line});
+ block.nodes.push({
+ type: 'Text',
+ val: '\n',
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ });
break;
case 'start-pug-interpolation':
block.nodes.push(this.parseExpr());
@@ -909,6 +966,7 @@ loop:
mustEscape: tok.mustEscape !== false,
isInline: true,
line: tok.line,
+ column: tok.col,
filename: this.filename
});
break;
@@ -962,6 +1020,7 @@ loop:
attributeBlocks: [],
isInline: false,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
@@ -983,6 +1042,7 @@ loop:
attributeBlocks: [],
isInline: inlineTags.indexOf(tok.val) !== -1,
line: tok.line,
+ column: tok.col,
filename: this.filename
};
@@ -1013,6 +1073,9 @@ loop:
tag.attrs.push({
name: tok.type,
val: "'" + tok.val + "'",
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename,
mustEscape: false
});
continue;
@@ -1025,7 +1088,13 @@ loop:
continue;
case '&attributes':
var tok = this.advance();
- tag.attributeBlocks.push(tok.val);
+ tag.attributeBlocks.push({
+ type: 'AttributeBlock',
+ val: tok.val,
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename
+ });
break;
default:
var pluginResult = this.runPlugin('tagAttributeTokens', this.peek(), tag, attributeNames);
@@ -1109,6 +1178,9 @@ loop:
attrs.push({
name: tok.name,
val: tok.val,
+ line: tok.line,
+ column: tok.col,
+ filename: this.filename,
mustEscape: tok.mustEscape !== false
});
tok = this.advance();
diff --git a/packages/pug-parser/test/__snapshots__/index.test.js.snap b/packages/pug-parser/test/__snapshots__/index.test.js.snap
index 432b53533..4fb3c80eb 100644
--- a/packages/pug-parser/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/index.test.js.snap
@@ -5,6 +5,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "attr-es2015.tokens.json",
"isInline": false,
"line": 1,
@@ -16,11 +17,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 4,
+ "filename": "attr-es2015.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "class",
"val": "\'avatar-div\'",
},
Object {
+ "column": 16,
+ "filename": "attr-es2015.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "style",
"val": "\`background-image: url(https://www.gravatar.com/avatar/\${avatar})\`",
@@ -32,6 +39,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attr-es2015.tokens.json",
"isInline": false,
"line": 3,
@@ -51,6 +59,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 1,
@@ -60,6 +69,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 2,
@@ -71,11 +81,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "href",
"val": "\'/user/\' + id",
},
Object {
+ "column": 23,
+ "filename": "attrs.js.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "class",
"val": "\'button\'",
@@ -87,6 +103,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 3,
@@ -98,11 +115,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "href",
"val": "\'/user/\' + id",
},
Object {
+ "column": 27,
+ "filename": "attrs.js.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "class",
"val": "\'button\'",
@@ -114,6 +137,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 4,
@@ -125,11 +149,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "attrs.js.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "key",
"val": "\'answer\'",
},
Object {
+ "column": 20,
+ "filename": "attrs.js.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "value",
"val": "answer()",
@@ -141,6 +171,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 5,
@@ -152,6 +183,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "class",
"val": "[\'class1\', \'class2\']",
@@ -163,6 +197,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 6,
@@ -174,11 +209,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 2,
+ "filename": "attrs.js.tokens.json",
+ "line": 7,
"mustEscape": false,
"name": "class",
"val": "\'tag-class\'",
},
Object {
+ "column": 13,
+ "filename": "attrs.js.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "class",
"val": "[\'class1\', \'class2\']",
@@ -190,6 +231,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 7,
@@ -201,11 +243,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "href",
"val": "\'/user/\' + id",
},
Object {
+ "column": 22,
+ "filename": "attrs.js.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "class",
"val": "\'button\'",
@@ -217,6 +265,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 9,
@@ -228,11 +277,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 10,
"mustEscape": true,
"name": "href",
"val": "\'/user/\' + id",
},
Object {
+ "column": 26,
+ "filename": "attrs.js.tokens.json",
+ "line": 10,
"mustEscape": true,
"name": "class",
"val": "\'button\'",
@@ -244,6 +299,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 10,
@@ -255,11 +311,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "attrs.js.tokens.json",
+ "line": 11,
"mustEscape": true,
"name": "key",
"val": "\'answer\'",
},
Object {
+ "column": 19,
+ "filename": "attrs.js.tokens.json",
+ "line": 11,
"mustEscape": true,
"name": "value",
"val": "answer()",
@@ -271,6 +333,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 11,
@@ -282,6 +345,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.js.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "class",
"val": "[\'class1\', \'class2\']",
@@ -293,6 +359,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 12,
@@ -304,11 +371,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 2,
+ "filename": "attrs.js.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'tag-class\'",
},
Object {
+ "column": 13,
+ "filename": "attrs.js.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "class",
"val": "[\'class1\', \'class2\']",
@@ -320,6 +393,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": true,
"line": 13,
@@ -329,10 +403,19 @@ Object {
},
Object {
"attributeBlocks": Array [
- "{foo: \'bar\'}",
+ Object {
+ "column": 11,
+ "filename": "attrs.js.tokens.json",
+ "line": 15,
+ "type": "AttributeBlock",
+ "val": "{foo: \'bar\'}",
+ },
],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.js.tokens.json",
+ "line": 15,
"mustEscape": true,
"name": "id",
"val": "id",
@@ -344,6 +427,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 15,
@@ -353,6 +437,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 16,
@@ -362,15 +447,27 @@ Object {
},
Object {
"attributeBlocks": Array [
- "{baz: \'baz\'}",
+ Object {
+ "column": 22,
+ "filename": "attrs.js.tokens.json",
+ "line": 17,
+ "type": "AttributeBlock",
+ "val": "{baz: \'baz\'}",
+ },
],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.js.tokens.json",
+ "line": 17,
"mustEscape": true,
"name": "foo",
"val": "null",
},
Object {
+ "column": 14,
+ "filename": "attrs.js.tokens.json",
+ "line": 17,
"mustEscape": true,
"name": "bar",
"val": "bar",
@@ -382,6 +479,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.js.tokens.json",
"isInline": false,
"line": 17,
@@ -403,6 +501,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "href",
"val": "\'/contact\'",
@@ -413,6 +514,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 20,
"filename": "attrs.tokens.json",
"line": 1,
"type": "Text",
@@ -421,6 +523,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 1,
@@ -432,11 +535,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "href",
"val": "\'/save\'",
},
Object {
+ "column": 16,
+ "filename": "attrs.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'button\'",
@@ -447,6 +556,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 24,
"filename": "attrs.tokens.json",
"line": 2,
"type": "Text",
@@ -455,6 +565,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 2,
@@ -466,16 +577,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "foo",
"val": true,
},
Object {
+ "column": 8,
+ "filename": "attrs.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "bar",
"val": true,
},
Object {
+ "column": 13,
+ "filename": "attrs.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "baz",
"val": true,
@@ -487,6 +607,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 3,
@@ -498,11 +619,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "foo",
"val": "\'foo, bar, baz\'",
},
Object {
+ "column": 24,
+ "filename": "attrs.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "bar",
"val": "1",
@@ -514,6 +641,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 4,
@@ -525,11 +653,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "foo",
"val": "\'((foo))\'",
},
Object {
+ "column": 18,
+ "filename": "attrs.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "bar",
"val": "(1) ? 1 : 0",
@@ -541,6 +675,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 5,
@@ -559,11 +694,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "attrs.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "value",
"val": "\'foo\'",
},
Object {
+ "column": 23,
+ "filename": "attrs.tokens.json",
+ "line": 7,
"mustEscape": false,
"name": "selected",
"val": true,
@@ -574,6 +715,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 33,
"filename": "attrs.tokens.json",
"line": 7,
"type": "Text",
@@ -582,6 +724,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 7,
@@ -593,11 +736,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "attrs.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "selected",
"val": true,
},
Object {
+ "column": 20,
+ "filename": "attrs.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "value",
"val": "\'bar\'",
@@ -608,6 +757,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 33,
"filename": "attrs.tokens.json",
"line": 8,
"type": "Text",
@@ -616,6 +766,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 8,
@@ -626,6 +777,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 6,
@@ -637,6 +789,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "foo",
"val": "\"class:\"",
@@ -648,6 +803,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 9,
@@ -659,6 +815,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "attrs.tokens.json",
+ "line": 10,
"mustEscape": true,
"name": "pattern",
"val": "\'\\\\S+\'",
@@ -670,6 +829,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 10,
@@ -681,6 +841,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "href",
"val": "\'/contact\'",
@@ -691,6 +854,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 20,
"filename": "attrs.tokens.json",
"line": 12,
"type": "Text",
@@ -699,6 +863,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 12,
@@ -710,11 +875,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "href",
"val": "\'/save\'",
},
Object {
+ "column": 16,
+ "filename": "attrs.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'button\'",
@@ -725,6 +896,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 24,
"filename": "attrs.tokens.json",
"line": 13,
"type": "Text",
@@ -733,6 +905,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 13,
@@ -744,16 +917,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 14,
"mustEscape": true,
"name": "foo",
"val": true,
},
Object {
+ "column": 7,
+ "filename": "attrs.tokens.json",
+ "line": 14,
"mustEscape": false,
"name": "bar",
"val": true,
},
Object {
+ "column": 11,
+ "filename": "attrs.tokens.json",
+ "line": 14,
"mustEscape": false,
"name": "baz",
"val": true,
@@ -765,6 +947,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 14,
@@ -776,11 +959,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 15,
"mustEscape": true,
"name": "foo",
"val": "\'foo, bar, baz\'",
},
Object {
+ "column": 23,
+ "filename": "attrs.tokens.json",
+ "line": 15,
"mustEscape": true,
"name": "bar",
"val": "1",
@@ -792,6 +981,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 15,
@@ -803,11 +993,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 16,
"mustEscape": true,
"name": "foo",
"val": "\'((foo))\'",
},
Object {
+ "column": 17,
+ "filename": "attrs.tokens.json",
+ "line": 16,
"mustEscape": true,
"name": "bar",
"val": "(1) ? 1 : 0",
@@ -819,6 +1015,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 16,
@@ -837,11 +1034,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "attrs.tokens.json",
+ "line": 18,
"mustEscape": true,
"name": "value",
"val": "\'foo\'",
},
Object {
+ "column": 22,
+ "filename": "attrs.tokens.json",
+ "line": 18,
"mustEscape": false,
"name": "selected",
"val": true,
@@ -852,6 +1055,7 @@ Object {
"line": 18,
"nodes": Array [
Object {
+ "column": 32,
"filename": "attrs.tokens.json",
"line": 18,
"type": "Text",
@@ -860,6 +1064,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 18,
@@ -871,11 +1076,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "attrs.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "selected",
"val": true,
},
Object {
+ "column": 19,
+ "filename": "attrs.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "value",
"val": "\'bar\'",
@@ -886,6 +1097,7 @@ Object {
"line": 19,
"nodes": Array [
Object {
+ "column": 32,
"filename": "attrs.tokens.json",
"line": 19,
"type": "Text",
@@ -894,6 +1106,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 19,
@@ -904,6 +1117,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 17,
@@ -915,6 +1129,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 20,
"mustEscape": true,
"name": "foo",
"val": "\"class:\"",
@@ -926,6 +1143,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 20,
@@ -937,6 +1155,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "attrs.tokens.json",
+ "line": 21,
"mustEscape": true,
"name": "pattern",
"val": "\'\\\\S+\'",
@@ -948,6 +1169,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 21,
@@ -959,6 +1181,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 22,
"mustEscape": true,
"name": "terse",
"val": "\"true\"",
@@ -970,6 +1195,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 22,
@@ -981,6 +1207,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 23,
"mustEscape": true,
"name": "date",
"val": "new Date(0)",
@@ -992,6 +1221,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 23,
@@ -1003,11 +1233,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 25,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 26,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1019,6 +1255,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 25,
@@ -1030,11 +1267,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 27,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 28,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1046,6 +1289,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 27,
@@ -1057,11 +1301,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 29,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 30,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1073,6 +1323,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 29,
@@ -1084,11 +1335,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 31,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 4,
+ "filename": "attrs.tokens.json",
+ "line": 32,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1100,6 +1357,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 31,
@@ -1111,11 +1369,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 33,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 34,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1127,6 +1391,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 33,
@@ -1138,11 +1403,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 35,
"mustEscape": true,
"name": "abc",
"val": true,
},
Object {
+ "column": 5,
+ "filename": "attrs.tokens.json",
+ "line": 36,
"mustEscape": false,
"name": "def",
"val": true,
@@ -1154,6 +1425,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 35,
@@ -1163,6 +1435,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 38,
@@ -1172,7 +1445,13 @@ Object {
},
Object {
"attributeBlocks": Array [
- "attrs",
+ Object {
+ "column": 4,
+ "filename": "attrs.tokens.json",
+ "line": 40,
+ "type": "AttributeBlock",
+ "val": "attrs",
+ },
],
"attrs": Array [],
"block": Object {
@@ -1181,6 +1460,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": false,
"line": 40,
@@ -1192,11 +1472,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 42,
"mustEscape": true,
"name": "foo",
"val": "\'foo\'",
},
Object {
+ "column": 14,
+ "filename": "attrs.tokens.json",
+ "line": 42,
"mustEscape": true,
"name": "bar",
"val": "\"bar\"",
@@ -1208,6 +1494,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 42,
@@ -1219,11 +1506,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "attrs.tokens.json",
+ "line": 43,
"mustEscape": true,
"name": "foo",
"val": "\'foo\'",
},
Object {
+ "column": 14,
+ "filename": "attrs.tokens.json",
+ "line": 43,
"mustEscape": true,
"name": "bar",
"val": "\'bar\'",
@@ -1235,6 +1528,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.tokens.json",
"isInline": true,
"line": 43,
@@ -1256,6 +1550,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "attrs.unescaped.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "type",
"val": "\'text/x-template\'",
@@ -1269,6 +1566,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "attrs.unescaped.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "id",
"val": "\'user-<%= user.id %>\'",
@@ -1286,6 +1586,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 8,
"filename": "attrs.unescaped.tokens.json",
"line": 3,
"type": "Text",
@@ -1294,6 +1595,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "attrs.unescaped.tokens.json",
"isInline": false,
"line": 3,
@@ -1304,6 +1606,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "attrs.unescaped.tokens.json",
"isInline": false,
"line": 2,
@@ -1314,6 +1617,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "attrs.unescaped.tokens.json",
"isInline": false,
"line": 1,
@@ -1333,6 +1637,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 1,
@@ -1344,6 +1649,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "data-user",
"val": "user",
@@ -1355,6 +1663,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 2,
@@ -1366,6 +1675,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "data-items",
"val": "[1,2,3]",
@@ -1377,6 +1689,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 3,
@@ -1388,6 +1701,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "data-username",
"val": "\'tobi\'",
@@ -1399,6 +1715,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 4,
@@ -1410,6 +1727,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "data-escaped",
"val": "{message: \"Let\'s rock!\"}",
@@ -1421,6 +1741,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 5,
@@ -1432,6 +1753,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "data-ampersand",
"val": "{message: \"a quote: " this & that\"}",
@@ -1443,6 +1767,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 6,
@@ -1454,6 +1779,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "attrs-data.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "data-epoc",
"val": "new Date(0)",
@@ -1465,6 +1793,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "attrs-data.tokens.json",
"isInline": false,
"line": 7,
@@ -1504,6 +1833,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 8,
"filename": "basic.tokens.json",
"line": 3,
"type": "Text",
@@ -1512,6 +1842,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "basic.tokens.json",
"isInline": false,
"line": 3,
@@ -1522,6 +1853,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "basic.tokens.json",
"isInline": false,
"line": 2,
@@ -1532,6 +1864,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "basic.tokens.json",
"isInline": false,
"line": 1,
@@ -1564,6 +1897,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 6,
"filename": "blanks.tokens.json",
"line": 4,
"type": "Text",
@@ -1572,6 +1906,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blanks.tokens.json",
"isInline": false,
"line": 4,
@@ -1587,6 +1922,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 6,
"filename": "blanks.tokens.json",
"line": 6,
"type": "Text",
@@ -1595,6 +1931,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blanks.tokens.json",
"isInline": false,
"line": 6,
@@ -1610,6 +1947,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 6,
"filename": "blanks.tokens.json",
"line": 8,
"type": "Text",
@@ -1618,6 +1956,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blanks.tokens.json",
"isInline": false,
"line": 8,
@@ -1628,6 +1967,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "blanks.tokens.json",
"isInline": false,
"line": 3,
@@ -1647,6 +1987,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "block-code.tokens.json",
"isInline": false,
"line": 1,
@@ -1657,6 +1998,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "block-code.tokens.json",
"line": 4,
"type": "Comment",
@@ -1664,6 +2006,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "block-code.tokens.json",
"isInline": false,
"line": 5,
@@ -1678,6 +2021,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 3,
"filename": "block-code.tokens.json",
"isInline": false,
"line": 7,
@@ -1697,6 +2041,7 @@ item.slice(1);",
"nodes": Array [
Object {
"buffer": true,
+ "column": 5,
"filename": "block-code.tokens.json",
"isInline": true,
"line": 12,
@@ -1707,6 +2052,7 @@ item.slice(1);",
],
"type": "Block",
},
+ "column": 3,
"filename": "block-code.tokens.json",
"isInline": false,
"line": 12,
@@ -1717,6 +2063,7 @@ item.slice(1);",
],
"type": "Block",
},
+ "column": 1,
"filename": "block-code.tokens.json",
"key": null,
"line": 6,
@@ -1745,6 +2092,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "block-expansion.shorthands.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'list-item\'",
@@ -1758,6 +2108,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 17,
+ "filename": "block-expansion.shorthands.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
@@ -1771,6 +2124,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 23,
+ "filename": "block-expansion.shorthands.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "id",
"val": "\'bar\'",
@@ -1781,6 +2137,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 28,
"filename": "block-expansion.shorthands.tokens.json",
"line": 2,
"type": "Text",
@@ -1789,6 +2146,7 @@ Object {
],
"type": "Block",
},
+ "column": 23,
"filename": "block-expansion.shorthands.tokens.json",
"isInline": false,
"line": 2,
@@ -1799,6 +2157,7 @@ Object {
],
"type": "Block",
},
+ "column": 17,
"filename": "block-expansion.shorthands.tokens.json",
"isInline": false,
"line": 2,
@@ -1809,6 +2168,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "block-expansion.shorthands.tokens.json",
"isInline": false,
"line": 2,
@@ -1819,6 +2179,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "block-expansion.shorthands.tokens.json",
"isInline": false,
"line": 1,
@@ -1854,6 +2215,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "block-expansion.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
@@ -1864,6 +2228,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 19,
"filename": "block-expansion.tokens.json",
"line": 2,
"type": "Text",
@@ -1872,6 +2237,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "block-expansion.tokens.json",
"isInline": true,
"line": 2,
@@ -1882,6 +2248,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "block-expansion.tokens.json",
"isInline": false,
"line": 2,
@@ -1900,6 +2267,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "block-expansion.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
@@ -1910,6 +2280,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 19,
"filename": "block-expansion.tokens.json",
"line": 3,
"type": "Text",
@@ -1918,6 +2289,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "block-expansion.tokens.json",
"isInline": true,
"line": 3,
@@ -1928,6 +2300,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "block-expansion.tokens.json",
"isInline": false,
"line": 3,
@@ -1938,6 +2311,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "block-expansion.tokens.json",
"isInline": false,
"line": 1,
@@ -1953,6 +2327,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 3,
"filename": "block-expansion.tokens.json",
"line": 5,
"type": "Text",
@@ -1961,6 +2336,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "block-expansion.tokens.json",
"isInline": false,
"line": 5,
@@ -1993,6 +2369,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 7,
"filename": "blockquote.tokens.json",
"line": 3,
"type": "Text",
@@ -2001,6 +2378,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blockquote.tokens.json",
"isInline": false,
"line": 2,
@@ -2016,6 +2394,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 14,
"filename": "blockquote.tokens.json",
"line": 4,
"type": "Text",
@@ -2024,6 +2403,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blockquote.tokens.json",
"isInline": false,
"line": 4,
@@ -2034,6 +2414,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "blockquote.tokens.json",
"isInline": false,
"line": 1,
@@ -2052,7 +2433,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "blocks-in-blocks.tokens.json",
"line": 1,
"path": "./auxiliary/blocks-in-blocks-layout.pug",
@@ -2063,6 +2446,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "blocks-in-blocks.tokens.json",
"line": 3,
"mode": "replace",
@@ -2076,6 +2460,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 6,
"filename": "blocks-in-blocks.tokens.json",
"line": 4,
"type": "Text",
@@ -2084,6 +2469,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "blocks-in-blocks.tokens.json",
"isInline": false,
"line": 4,
@@ -2106,6 +2492,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "blocks-in-if.tokens.json",
"line": 1,
"type": "Comment",
@@ -2113,6 +2500,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 3,
@@ -2127,12 +2515,14 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "blocks-in-if.tokens.json",
"line": 6,
"type": "Comment",
"val": " return only contents if ajax requests",
},
Object {
+ "column": 5,
"filename": "blocks-in-if.tokens.json",
"line": 7,
"mode": "replace",
@@ -2146,6 +2536,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 11,
"filename": "blocks-in-if.tokens.json",
"line": 8,
"type": "Text",
@@ -2154,6 +2545,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 8,
@@ -2168,6 +2560,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 5,
@@ -2182,12 +2575,14 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "blocks-in-if.tokens.json",
"line": 11,
"type": "Comment",
"val": " return all html",
},
Object {
+ "column": 5,
"filename": "blocks-in-if.tokens.json",
"line": 12,
"type": "Doctype",
@@ -2211,6 +2606,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 19,
+ "filename": "blocks-in-if.tokens.json",
+ "line": 15,
"mustEscape": true,
"name": "charset",
"val": "\'utf8\'",
@@ -2222,6 +2620,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 13,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 15,
@@ -2237,6 +2636,7 @@ Object {
"line": 16,
"nodes": Array [
Object {
+ "column": 19,
"filename": "blocks-in-if.tokens.json",
"line": 16,
"type": "Text",
@@ -2245,6 +2645,7 @@ Object {
],
"type": "Block",
},
+ "column": 13,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 16,
@@ -2260,6 +2661,7 @@ Object {
"line": 17,
"nodes": Array [
Object {
+ "column": 17,
"filename": "blocks-in-if.tokens.json",
"line": 18,
"mode": "replace",
@@ -2273,6 +2675,7 @@ Object {
"line": 19,
"nodes": Array [
Object {
+ "column": 23,
"filename": "blocks-in-if.tokens.json",
"line": 19,
"type": "Text",
@@ -2281,6 +2684,7 @@ Object {
],
"type": "Block",
},
+ "column": 21,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 19,
@@ -2294,6 +2698,7 @@ Object {
],
"type": "Block",
},
+ "column": 13,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 17,
@@ -2304,6 +2709,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 14,
@@ -2314,6 +2720,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
"line": 13,
@@ -2325,6 +2732,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"debug": false,
"filename": "blocks-in-if.tokens.json",
"isInline": false,
@@ -2359,6 +2767,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "case.tokens.json",
"isInline": false,
"line": 3,
@@ -2384,6 +2793,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 17,
"filename": "case.tokens.json",
"line": 5,
"type": "Text",
@@ -2392,6 +2802,7 @@ Object {
],
"type": "Block",
},
+ "column": 15,
"filename": "case.tokens.json",
"isInline": false,
"line": 5,
@@ -2402,6 +2813,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "0",
"filename": "case.tokens.json",
@@ -2421,6 +2833,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 17,
"filename": "case.tokens.json",
"line": 6,
"type": "Text",
@@ -2429,6 +2842,7 @@ Object {
],
"type": "Block",
},
+ "column": 15,
"filename": "case.tokens.json",
"isInline": false,
"line": 6,
@@ -2439,6 +2853,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "1",
"filename": "case.tokens.json",
@@ -2458,6 +2873,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 18,
"filename": "case.tokens.json",
"line": 7,
"type": "Text",
@@ -2465,6 +2881,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 27,
"filename": "case.tokens.json",
"isInline": true,
"line": 7,
@@ -2473,6 +2890,7 @@ Object {
"val": "friends",
},
Object {
+ "column": 37,
"filename": "case.tokens.json",
"line": 7,
"type": "Text",
@@ -2481,6 +2899,7 @@ Object {
],
"type": "Block",
},
+ "column": 16,
"filename": "case.tokens.json",
"isInline": false,
"line": 7,
@@ -2491,6 +2910,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "default",
"filename": "case.tokens.json",
@@ -2500,6 +2920,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"expr": "friends",
"filename": "case.tokens.json",
"line": 4,
@@ -2507,6 +2928,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 5,
"filename": "case.tokens.json",
"isInline": false,
"line": 8,
@@ -2520,6 +2942,7 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 7,
"debug": false,
"expr": "0",
"filename": "case.tokens.json",
@@ -2539,6 +2962,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 11,
"filename": "case.tokens.json",
"line": 12,
"type": "Text",
@@ -2547,6 +2971,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "case.tokens.json",
"isInline": false,
"line": 12,
@@ -2557,6 +2982,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "1",
"filename": "case.tokens.json",
@@ -2576,6 +3002,7 @@ Object {
"line": 14,
"nodes": Array [
Object {
+ "column": 11,
"filename": "case.tokens.json",
"line": 14,
"type": "Text",
@@ -2583,6 +3010,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 20,
"filename": "case.tokens.json",
"isInline": true,
"line": 14,
@@ -2591,6 +3019,7 @@ Object {
"val": "friends",
},
Object {
+ "column": 30,
"filename": "case.tokens.json",
"line": 14,
"type": "Text",
@@ -2599,6 +3028,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "case.tokens.json",
"isInline": false,
"line": 14,
@@ -2609,6 +3039,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "default",
"filename": "case.tokens.json",
@@ -2618,6 +3049,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"expr": "friends",
"filename": "case.tokens.json",
"line": 9,
@@ -2626,6 +3058,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "case.tokens.json",
"isInline": false,
"line": 2,
@@ -2636,6 +3069,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "case.tokens.json",
"isInline": false,
"line": 1,
@@ -2669,6 +3103,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 3,
@@ -2694,6 +3129,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 11,
"filename": "case-blocks.tokens.json",
"line": 6,
"type": "Text",
@@ -2702,6 +3138,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 6,
@@ -2712,6 +3149,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "0",
"filename": "case-blocks.tokens.json",
@@ -2731,6 +3169,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 11,
"filename": "case-blocks.tokens.json",
"line": 8,
"type": "Text",
@@ -2739,6 +3178,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 8,
@@ -2749,6 +3189,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "1",
"filename": "case-blocks.tokens.json",
@@ -2768,6 +3209,7 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 11,
"filename": "case-blocks.tokens.json",
"line": 10,
"type": "Text",
@@ -2775,6 +3217,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 20,
"filename": "case-blocks.tokens.json",
"isInline": true,
"line": 10,
@@ -2783,6 +3226,7 @@ Object {
"val": "friends",
},
Object {
+ "column": 30,
"filename": "case-blocks.tokens.json",
"line": 10,
"type": "Text",
@@ -2791,6 +3235,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 10,
@@ -2801,6 +3246,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"debug": false,
"expr": "default",
"filename": "case-blocks.tokens.json",
@@ -2810,6 +3256,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"expr": "friends",
"filename": "case-blocks.tokens.json",
"line": 4,
@@ -2818,6 +3265,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 2,
@@ -2828,6 +3276,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "case-blocks.tokens.json",
"isInline": false,
"line": 1,
@@ -2849,6 +3298,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "classes.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "class",
"val": "[\'foo\', \'bar\', \'baz\']",
@@ -2860,6 +3312,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes.tokens.json",
"isInline": true,
"line": 1,
@@ -2871,16 +3324,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 2,
+ "filename": "classes.tokens.json",
+ "line": 5,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
},
Object {
+ "column": 7,
+ "filename": "classes.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "class",
"val": "\'bar\'",
},
Object {
+ "column": 19,
+ "filename": "classes.tokens.json",
+ "line": 5,
"mustEscape": false,
"name": "class",
"val": "\'baz\'",
@@ -2892,6 +3354,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes.tokens.json",
"isInline": true,
"line": 5,
@@ -2903,6 +3366,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 2,
+ "filename": "classes.tokens.json",
+ "line": 9,
"mustEscape": false,
"name": "class",
"val": "\'foo-bar_baz\'",
@@ -2914,6 +3380,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes.tokens.json",
"isInline": true,
"line": 9,
@@ -2925,6 +3392,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "classes.tokens.json",
+ "line": 11,
"mustEscape": true,
"name": "class",
"val": "{foo: true, bar: false, baz: true}",
@@ -2936,6 +3406,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes.tokens.json",
"isInline": true,
"line": 11,
@@ -2957,6 +3428,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "classes-empty.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "class",
"val": "\'\'",
@@ -2968,6 +3442,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes-empty.tokens.json",
"isInline": true,
"line": 1,
@@ -2979,6 +3454,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "classes-empty.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "class",
"val": "null",
@@ -2990,6 +3468,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes-empty.tokens.json",
"isInline": true,
"line": 2,
@@ -3001,6 +3480,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "classes-empty.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "class",
"val": "undefined",
@@ -3012,6 +3494,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "classes-empty.tokens.json",
"isInline": true,
"line": 3,
@@ -3042,6 +3525,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 3,
"type": "Text",
@@ -3050,6 +3534,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 3,
@@ -3061,6 +3546,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 2,
@@ -3081,6 +3567,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 5,
"type": "Text",
@@ -3089,6 +3576,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 5,
@@ -3100,6 +3588,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"debug": false,
"filename": "code.conditionals.tokens.json",
"isInline": false,
@@ -3121,6 +3610,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 8,
"type": "Text",
@@ -3129,6 +3619,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 8,
@@ -3140,6 +3631,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 7,
@@ -3160,6 +3652,7 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 10,
"type": "Text",
@@ -3168,6 +3661,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 10,
@@ -3179,6 +3673,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 9,
@@ -3188,6 +3683,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 11,
@@ -3208,6 +3704,7 @@ Object {
"line": 18,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 18,
"type": "Text",
@@ -3216,6 +3713,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 18,
@@ -3226,6 +3724,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 14,
@@ -3238,6 +3737,7 @@ Object {
"line": 14,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 14,
"type": "Text",
@@ -3246,6 +3746,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 14,
@@ -3261,6 +3762,7 @@ Object {
"line": 15,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 15,
"type": "Text",
@@ -3269,6 +3771,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 15,
@@ -3284,6 +3787,7 @@ Object {
"line": 16,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 16,
"type": "Text",
@@ -3292,6 +3796,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 16,
@@ -3320,6 +3825,7 @@ Object {
"line": 23,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 23,
"type": "Text",
@@ -3328,6 +3834,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 23,
@@ -3338,6 +3845,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 21,
@@ -3350,6 +3858,7 @@ Object {
"line": 21,
"nodes": Array [
Object {
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"line": 21,
"type": "Text",
@@ -3358,6 +3867,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 21,
@@ -3375,12 +3885,14 @@ Object {
},
Object {
"alternate": null,
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 26,
"nodes": Array [
Object {
"alternate": null,
+ "column": 3,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 27,
@@ -3393,6 +3905,7 @@ Object {
"line": 27,
"nodes": Array [
Object {
+ "column": 7,
"filename": "code.conditionals.tokens.json",
"line": 27,
"type": "Text",
@@ -3401,6 +3914,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 27,
@@ -3426,6 +3940,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"line": 29,
"type": "Comment",
@@ -3440,6 +3955,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.conditionals.tokens.json",
+ "line": 32,
"mustEscape": false,
"name": "class",
"val": "\'bar\'",
@@ -3451,6 +3969,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 32,
@@ -3461,6 +3980,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 30,
@@ -3474,6 +3994,7 @@ Object {
},
Object {
"alternate": null,
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 34,
@@ -3482,6 +4003,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.conditionals.tokens.json",
+ "line": 34,
"mustEscape": false,
"name": "class",
"val": "\'bar\'",
@@ -3493,6 +4017,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 34,
@@ -3512,6 +4037,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 1,
+ "filename": "code.conditionals.tokens.json",
+ "line": 36,
"mustEscape": false,
"name": "class",
"val": "\'bing\'",
@@ -3523,6 +4051,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 36,
@@ -3540,6 +4069,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.conditionals.tokens.json",
+ "line": 43,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
@@ -3551,6 +4083,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 43,
@@ -3561,6 +4094,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 41,
@@ -3569,6 +4103,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.conditionals.tokens.json",
+ "line": 41,
"mustEscape": false,
"name": "class",
"val": "\'bar\'",
@@ -3580,6 +4117,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 41,
@@ -3595,6 +4133,7 @@ Object {
"test": "false",
"type": "Conditional",
},
+ "column": 1,
"consequent": Object {
"filename": "code.conditionals.tokens.json",
"line": 39,
@@ -3603,6 +4142,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.conditionals.tokens.json",
+ "line": 39,
"mustEscape": false,
"name": "class",
"val": "\'bing\'",
@@ -3614,6 +4156,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "code.conditionals.tokens.json",
"isInline": false,
"line": 39,
@@ -3648,6 +4191,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.escape.tokens.json",
"isInline": true,
"line": 1,
@@ -3658,6 +4202,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.escape.tokens.json",
"isInline": false,
"line": 1,
@@ -3674,6 +4219,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.escape.tokens.json",
"isInline": true,
"line": 2,
@@ -3684,6 +4230,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.escape.tokens.json",
"isInline": false,
"line": 2,
@@ -3703,6 +4250,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 2,
@@ -3731,6 +4279,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 6,
@@ -3741,6 +4290,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 6,
@@ -3752,6 +4302,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 3,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 5,
@@ -3761,6 +4312,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 3,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 7,
@@ -3771,6 +4323,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 4,
@@ -3780,6 +4333,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 9,
@@ -3803,6 +4357,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "code.iteration.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "class",
"val": "\'item-\' + i",
@@ -3814,6 +4371,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 26,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 13,
@@ -3824,6 +4382,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 13,
@@ -3834,6 +4393,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.iteration.tokens.json",
"key": "i",
"line": 12,
@@ -3844,6 +4404,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 11,
@@ -3872,6 +4433,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 17,
@@ -3882,6 +4444,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 17,
@@ -3892,6 +4455,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.iteration.tokens.json",
"key": "i",
"line": 16,
@@ -3902,6 +4466,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 15,
@@ -3930,6 +4495,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 21,
@@ -3940,6 +4506,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 21,
@@ -3950,6 +4517,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.iteration.tokens.json",
"key": null,
"line": 20,
@@ -3960,6 +4528,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 19,
@@ -3969,6 +4538,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 23,
@@ -3978,6 +4548,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 24,
@@ -4011,6 +4582,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 10,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 29,
@@ -4019,6 +4591,7 @@ Object {
"val": "n",
},
Object {
+ "column": 14,
"filename": "code.iteration.tokens.json",
"line": 29,
"type": "Text",
@@ -4026,6 +4599,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 16,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 29,
@@ -4036,6 +4610,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 29,
@@ -4046,6 +4621,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"key": null,
"line": 28,
@@ -4056,6 +4632,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.iteration.tokens.json",
"key": null,
"line": 27,
@@ -4066,6 +4643,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 26,
@@ -4075,6 +4653,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 31,
@@ -4084,6 +4663,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 32,
@@ -4112,6 +4692,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 8,
"filename": "code.iteration.tokens.json",
"isInline": true,
"line": 35,
@@ -4122,6 +4703,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 35,
@@ -4132,6 +4714,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "code.iteration.tokens.json",
"key": null,
"line": 34,
@@ -4142,6 +4725,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.iteration.tokens.json",
"isInline": false,
"line": 33,
@@ -4168,6 +4752,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.tokens.json",
"isInline": true,
"line": 1,
@@ -4178,6 +4763,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 1,
@@ -4194,6 +4780,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.tokens.json",
"isInline": true,
"line": 2,
@@ -4204,6 +4791,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 2,
@@ -4220,6 +4808,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.tokens.json",
"isInline": true,
"line": 3,
@@ -4230,6 +4819,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 3,
@@ -4246,6 +4836,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.tokens.json",
"isInline": true,
"line": 4,
@@ -4256,6 +4847,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 4,
@@ -4272,6 +4864,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 2,
"filename": "code.tokens.json",
"isInline": true,
"line": 5,
@@ -4282,6 +4875,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 5,
@@ -4293,6 +4887,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "foo",
"val": "null",
@@ -4304,6 +4901,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 6,
@@ -4315,6 +4913,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "foo",
"val": "undefined",
@@ -4326,6 +4927,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 7,
@@ -4337,6 +4939,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "foo",
"val": "\'\'",
@@ -4348,6 +4953,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 8,
@@ -4359,6 +4965,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "foo",
"val": "0",
@@ -4370,6 +4979,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 9,
@@ -4381,6 +4991,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "code.tokens.json",
+ "line": 10,
"mustEscape": true,
"name": "foo",
"val": "false",
@@ -4392,6 +5005,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "code.tokens.json",
"isInline": false,
"line": 10,
@@ -4415,17 +5029,23 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.source.tokens.json",
"line": 2,
"type": "Text",
"val": "s/s.",
},
Object {
+ "column": 1,
+ "filename": "comments.source.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.source.tokens.json",
"line": 3,
"type": "Text",
"val": "",
@@ -4434,6 +5054,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "comments.source.tokens.json",
"line": 1,
"type": "BlockComment",
@@ -4441,6 +5062,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "comments.source.tokens.json",
"line": 4,
"type": "Comment",
@@ -4452,28 +5074,38 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.source.tokens.json",
"line": 7,
"type": "Text",
"val": "test/cases/comments.source.pug",
},
Object {
+ "column": 1,
+ "filename": "comments.source.tokens.json",
"line": 8,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.source.tokens.json",
"line": 8,
"type": "Text",
"val": "when",
},
Object {
+ "column": 1,
+ "filename": "comments.source.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.source.tokens.json",
"line": 9,
"type": "Text",
"val": "()",
@@ -4482,6 +5114,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 1,
"filename": "comments.source.tokens.json",
"line": 6,
"type": "BlockComment",
@@ -4499,6 +5132,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 1,
"filename": "comments.tokens.json",
"line": 2,
"type": "Comment",
@@ -4513,6 +5147,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 3,
"filename": "comments.tokens.json",
"line": 4,
"type": "Comment",
@@ -4526,6 +5161,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 6,
"filename": "comments.tokens.json",
"line": 5,
"type": "Text",
@@ -4534,6 +5170,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "comments.tokens.json",
"isInline": false,
"line": 5,
@@ -4543,6 +5180,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 3,
"filename": "comments.tokens.json",
"line": 6,
"type": "Comment",
@@ -4556,6 +5194,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 6,
"filename": "comments.tokens.json",
"line": 7,
"type": "Text",
@@ -4564,6 +5203,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "comments.tokens.json",
"isInline": false,
"line": 7,
@@ -4574,6 +5214,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "comments.tokens.json",
"isInline": false,
"line": 3,
@@ -4587,28 +5228,38 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 10,
"type": "Text",
"val": "ul",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 11,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 11,
"type": "Text",
"val": " li foo",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 12,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 12,
"type": "Text",
"val": "",
@@ -4617,6 +5268,7 @@ Object {
"type": "Block",
},
"buffer": true,
+ "column": 1,
"filename": "comments.tokens.json",
"line": 9,
"type": "BlockComment",
@@ -4628,28 +5280,38 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 14,
"type": "Text",
"val": "// inline follow",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 15,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 15,
"type": "Text",
"val": "li three",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 16,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 16,
"type": "Text",
"val": "",
@@ -4658,6 +5320,7 @@ Object {
"type": "Block",
},
"buffer": true,
+ "column": 1,
"filename": "comments.tokens.json",
"line": 13,
"type": "BlockComment",
@@ -4669,39 +5332,53 @@ Object {
"line": 17,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 18,
"type": "Text",
"val": "// inline followed by tags",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 19,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 19,
"type": "Text",
"val": "ul",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 20,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 20,
"type": "Text",
"val": " li four",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 21,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 21,
"type": "Text",
"val": "",
@@ -4710,6 +5387,7 @@ Object {
"type": "Block",
},
"buffer": true,
+ "column": 1,
"filename": "comments.tokens.json",
"line": 17,
"type": "BlockComment",
@@ -4721,39 +5399,53 @@ Object {
"line": 22,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 23,
"type": "Text",
"val": "// inline",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 24,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 24,
"type": "Text",
"val": "script(src=\'/lame.js\')",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 25,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 25,
"type": "Text",
"val": "// end-inline",
},
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
"line": 26,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "comments.tokens.json",
"line": 26,
"type": "Text",
"val": "",
@@ -4762,6 +5454,7 @@ Object {
"type": "Block",
},
"buffer": true,
+ "column": 1,
"filename": "comments.tokens.json",
"line": 22,
"type": "BlockComment",
@@ -4775,6 +5468,7 @@ Object {
"line": 27,
"nodes": Array [
Object {
+ "column": 3,
"filename": "comments.tokens.json",
"line": 27,
"type": "Text",
@@ -4783,6 +5477,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "comments.tokens.json",
"isInline": false,
"line": 27,
@@ -4794,6 +5489,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 1,
+ "filename": "comments.tokens.json",
+ "line": 29,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
@@ -4804,6 +5502,7 @@ Object {
"line": 29,
"nodes": Array [
Object {
+ "column": 6,
"filename": "comments.tokens.json",
"line": 29,
"type": "Text",
@@ -4812,6 +5511,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "comments.tokens.json",
"isInline": false,
"line": 29,
@@ -4830,6 +5530,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "comments-in-case.tokens.json",
"line": 1,
"type": "Doctype",
@@ -4851,6 +5552,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 4,
"filename": "comments-in-case.tokens.json",
"isInline": false,
"line": 4,
@@ -4876,6 +5578,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 10,
"filename": "comments-in-case.tokens.json",
"line": 8,
"type": "Text",
@@ -4884,6 +5587,7 @@ Object {
],
"type": "Block",
},
+ "column": 8,
"filename": "comments-in-case.tokens.json",
"isInline": false,
"line": 8,
@@ -4894,6 +5598,7 @@ Object {
],
"type": "Block",
},
+ "column": 6,
"debug": false,
"expr": "\'this\'",
"filename": "comments-in-case.tokens.json",
@@ -4913,6 +5618,7 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 10,
"filename": "comments-in-case.tokens.json",
"line": 10,
"type": "Text",
@@ -4921,6 +5627,7 @@ Object {
],
"type": "Block",
},
+ "column": 8,
"filename": "comments-in-case.tokens.json",
"isInline": false,
"line": 10,
@@ -4931,6 +5638,7 @@ Object {
],
"type": "Block",
},
+ "column": 6,
"debug": false,
"expr": "\'that\'",
"filename": "comments-in-case.tokens.json",
@@ -4940,6 +5648,7 @@ Object {
],
"type": "Block",
},
+ "column": 4,
"expr": "s",
"filename": "comments-in-case.tokens.json",
"line": 5,
@@ -4948,6 +5657,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "comments-in-case.tokens.json",
"isInline": false,
"line": 3,
@@ -4958,6 +5668,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "comments-in-case.tokens.json",
"isInline": false,
"line": 2,
@@ -4976,6 +5687,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "doctype.custom.tokens.json",
"line": 1,
"type": "Doctype",
@@ -4992,6 +5704,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "doctype.default.tokens.json",
"line": 1,
"type": "Doctype",
@@ -5019,6 +5732,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 8,
"filename": "doctype.default.tokens.json",
"line": 4,
"type": "Text",
@@ -5027,6 +5741,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "doctype.default.tokens.json",
"isInline": false,
"line": 4,
@@ -5037,6 +5752,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "doctype.default.tokens.json",
"isInline": false,
"line": 3,
@@ -5047,6 +5763,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "doctype.default.tokens.json",
"isInline": false,
"line": 2,
@@ -5065,6 +5782,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "doctype.keyword.tokens.json",
"line": 1,
"type": "Doctype",
@@ -5082,6 +5800,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 2,
@@ -5109,6 +5828,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 8,
"filename": "each.else.tokens.json",
"line": 8,
"type": "Text",
@@ -5117,6 +5837,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 8,
@@ -5140,6 +5861,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 6,
@@ -5150,6 +5872,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 6,
@@ -5160,6 +5883,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "each.else.tokens.json",
"key": null,
"line": 5,
@@ -5170,6 +5894,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 4,
@@ -5179,6 +5904,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 11,
@@ -5188,6 +5914,7 @@ Object {
},
Object {
"alternate": null,
+ "column": 1,
"consequent": Object {
"filename": "each.else.tokens.json",
"line": 14,
@@ -5212,6 +5939,7 @@ Object {
"line": 18,
"nodes": Array [
Object {
+ "column": 10,
"filename": "each.else.tokens.json",
"line": 18,
"type": "Text",
@@ -5220,6 +5948,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 18,
@@ -5243,6 +5972,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 9,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 16,
@@ -5253,6 +5983,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 16,
@@ -5263,6 +5994,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"key": null,
"line": 15,
@@ -5273,6 +6005,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 14,
@@ -5290,6 +6023,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 20,
@@ -5317,6 +6051,7 @@ Object {
"line": 26,
"nodes": Array [
Object {
+ "column": 8,
"filename": "each.else.tokens.json",
"line": 26,
"type": "Text",
@@ -5325,6 +6060,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 26,
@@ -5348,6 +6084,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 8,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 24,
@@ -5356,6 +6093,7 @@ Object {
"val": "key",
},
Object {
+ "column": 14,
"filename": "each.else.tokens.json",
"line": 24,
"type": "Text",
@@ -5363,6 +6101,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 16,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 24,
@@ -5373,6 +6112,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 24,
@@ -5383,6 +6123,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "each.else.tokens.json",
"key": "key",
"line": 23,
@@ -5393,6 +6134,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 22,
@@ -5402,6 +6144,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 28,
@@ -5429,6 +6172,7 @@ Object {
"line": 34,
"nodes": Array [
Object {
+ "column": 8,
"filename": "each.else.tokens.json",
"line": 34,
"type": "Text",
@@ -5437,6 +6181,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 34,
@@ -5460,6 +6205,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 8,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 32,
@@ -5468,6 +6214,7 @@ Object {
"val": "key",
},
Object {
+ "column": 14,
"filename": "each.else.tokens.json",
"line": 32,
"type": "Text",
@@ -5475,6 +6222,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 16,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 32,
@@ -5485,6 +6233,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 32,
@@ -5495,6 +6244,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "each.else.tokens.json",
"key": "key",
"line": 31,
@@ -5505,6 +6255,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 30,
@@ -5514,6 +6265,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 36,
@@ -5523,6 +6275,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 37,
@@ -5550,6 +6303,7 @@ Object {
"line": 43,
"nodes": Array [
Object {
+ "column": 8,
"filename": "each.else.tokens.json",
"line": 43,
"type": "Text",
@@ -5558,6 +6312,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 43,
@@ -5581,6 +6336,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 8,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 41,
@@ -5589,6 +6345,7 @@ Object {
"val": "key",
},
Object {
+ "column": 14,
"filename": "each.else.tokens.json",
"line": 41,
"type": "Text",
@@ -5596,6 +6353,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 16,
"filename": "each.else.tokens.json",
"isInline": true,
"line": 41,
@@ -5606,6 +6364,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 41,
@@ -5616,6 +6375,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "each.else.tokens.json",
"key": "key",
"line": 40,
@@ -5626,6 +6386,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "each.else.tokens.json",
"isInline": false,
"line": 39,
@@ -5651,6 +6412,8 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "escape-chars.tokens.json",
"line": 2,
"type": "Text",
"val": "var re = /\\d+/;",
@@ -5658,6 +6421,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "escape-chars.tokens.json",
"isInline": false,
"line": 1,
@@ -5677,6 +6441,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "escape-test.tokens.json",
"line": 1,
"type": "Doctype",
@@ -5704,6 +6469,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 15,
"filename": "escape-test.tokens.json",
"line": 4,
"type": "Text",
@@ -5712,6 +6478,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 4,
@@ -5722,6 +6489,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 3,
@@ -5745,6 +6513,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 13,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 7,
@@ -5754,6 +6523,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 15,
"filename": "escape-test.tokens.json",
"isInline": true,
"line": 8,
@@ -5764,6 +6534,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 6,
@@ -5774,6 +6545,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 5,
@@ -5784,6 +6556,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "escape-test.tokens.json",
"isInline": false,
"line": 2,
@@ -5805,6 +6578,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "attr",
"val": "\"<%= bar %>\"",
@@ -5816,6 +6592,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 1,
@@ -5827,6 +6604,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "class",
"val": "\"<%= bar %>\"",
@@ -5838,6 +6618,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 2,
@@ -5849,6 +6630,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "attr",
"val": "\"<%= bar %>\"",
@@ -5860,6 +6644,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 3,
@@ -5871,6 +6656,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 4,
"mustEscape": false,
"name": "class",
"val": "\"<%= bar %>\"",
@@ -5882,6 +6670,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 4,
@@ -5893,6 +6682,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 5,
"mustEscape": false,
"name": "class",
"val": "\"<%= bar %> lol rofl\"",
@@ -5904,6 +6696,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 5,
@@ -5915,6 +6708,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "escaping-class-attribute.tokens.json",
+ "line": 6,
"mustEscape": false,
"name": "class",
"val": "\"<%= bar %> lol rofl <%= lmao %>\"",
@@ -5926,6 +6722,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "escaping-class-attribute.tokens.json",
"isInline": false,
"line": 6,
@@ -5950,7 +6747,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "filter-in-include.tokens.json",
"line": 1,
"path": "./auxiliary/filter-in-include.pug",
@@ -5974,6 +6773,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "filters.coffeescript.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "type",
"val": "\'text/javascript\'",
@@ -5990,6 +6792,8 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "filters.coffeescript.tokens.json",
"line": 3,
"type": "Text",
"val": "regexp = /\\n/",
@@ -5997,6 +6801,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.coffeescript.tokens.json",
"line": 2,
"name": "coffee-script",
@@ -6005,6 +6810,9 @@ Object {
Object {
"attrs": Array [
Object {
+ "column": 18,
+ "filename": "filters.coffeescript.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "minify",
"val": "true",
@@ -6015,17 +6823,23 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "filters.coffeescript.tokens.json",
"line": 5,
"type": "Text",
"val": "math =",
},
Object {
+ "column": 1,
+ "filename": "filters.coffeescript.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "filters.coffeescript.tokens.json",
"line": 6,
"type": "Text",
"val": " square: (value) -> value * value",
@@ -6033,6 +6847,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.coffeescript.tokens.json",
"line": 4,
"name": "coffee-script",
@@ -6041,6 +6856,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.coffeescript.tokens.json",
"isInline": false,
"line": 1,
@@ -6075,11 +6891,17 @@ Object {
Object {
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "filters.custom.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "opt",
"val": "\'val\'",
},
Object {
+ "column": 23,
+ "filename": "filters.custom.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "num",
"val": "2",
@@ -6090,39 +6912,53 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 7,
+ "filename": "filters.custom.tokens.json",
"line": 4,
"type": "Text",
"val": "Line 1",
},
Object {
+ "column": 1,
+ "filename": "filters.custom.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "filters.custom.tokens.json",
"line": 5,
"type": "Text",
"val": "Line 2",
},
Object {
+ "column": 1,
+ "filename": "filters.custom.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "filters.custom.tokens.json",
"line": 6,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "filters.custom.tokens.json",
"line": 7,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "filters.custom.tokens.json",
"line": 7,
"type": "Text",
"val": "Line 4",
@@ -6130,6 +6966,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.custom.tokens.json",
"line": 3,
"name": "custom",
@@ -6138,6 +6975,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.custom.tokens.json",
"isInline": false,
"line": 2,
@@ -6148,6 +6986,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.custom.tokens.json",
"isInline": false,
"line": 1,
@@ -6187,7 +7026,9 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 7,
"file": Object {
+ "column": 39,
"filename": "filters.include.custom.tokens.json",
"line": 4,
"path": "filters.include.custom.pug",
@@ -6198,16 +7039,23 @@ Object {
Object {
"attrs": Array [
Object {
+ "column": 22,
+ "filename": "filters.include.custom.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "opt",
"val": "\'val\'",
},
Object {
+ "column": 32,
+ "filename": "filters.include.custom.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "num",
"val": "2",
},
],
+ "column": 14,
"filename": "filters.include.custom.tokens.json",
"line": 4,
"name": "custom",
@@ -6220,6 +7068,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.include.custom.tokens.json",
"isInline": false,
"line": 3,
@@ -6230,6 +7079,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.include.custom.tokens.json",
"isInline": false,
"line": 2,
@@ -6240,6 +7090,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.include.custom.tokens.json",
"isInline": false,
"line": 1,
@@ -6272,7 +7123,9 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"file": Object {
+ "column": 25,
"filename": "filters.include.tokens.json",
"line": 3,
"path": "some.md",
@@ -6282,6 +7135,7 @@ Object {
"filters": Array [
Object {
"attrs": Array [],
+ "column": 12,
"filename": "filters.include.tokens.json",
"line": 3,
"name": "markdown-it",
@@ -6299,7 +7153,9 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 7,
"file": Object {
+ "column": 42,
"filename": "filters.include.tokens.json",
"line": 5,
"path": "include-filter-coffee.coffee",
@@ -6310,11 +7166,15 @@ Object {
Object {
"attrs": Array [
Object {
+ "column": 29,
+ "filename": "filters.include.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "minify",
"val": "true",
},
],
+ "column": 14,
"filename": "filters.include.tokens.json",
"line": 5,
"name": "coffee-script",
@@ -6327,6 +7187,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.include.tokens.json",
"isInline": false,
"line": 4,
@@ -6342,7 +7203,9 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 7,
"file": Object {
+ "column": 43,
"filename": "filters.include.tokens.json",
"line": 7,
"path": "include-filter-coffee.coffee",
@@ -6353,11 +7216,15 @@ Object {
Object {
"attrs": Array [
Object {
+ "column": 29,
+ "filename": "filters.include.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "minify",
"val": "false",
},
],
+ "column": 14,
"filename": "filters.include.tokens.json",
"line": 7,
"name": "coffee-script",
@@ -6370,6 +7237,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.include.tokens.json",
"isInline": false,
"line": 6,
@@ -6380,6 +7248,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.include.tokens.json",
"isInline": false,
"line": 2,
@@ -6390,6 +7259,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.include.tokens.json",
"isInline": false,
"line": 1,
@@ -6415,6 +7285,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
"filename": "filters.inline.tokens.json",
"line": 1,
"type": "Text",
@@ -6427,6 +7298,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 19,
"filename": "filters.inline.tokens.json",
"line": 1,
"type": "Text",
@@ -6435,12 +7307,14 @@ Object {
],
"type": "Block",
},
+ "column": 12,
"filename": "filters.inline.tokens.json",
"line": 1,
"name": "cdata",
"type": "Filter",
},
Object {
+ "column": 26,
"filename": "filters.inline.tokens.json",
"line": 1,
"type": "Text",
@@ -6449,6 +7323,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.inline.tokens.json",
"isInline": false,
"line": 1,
@@ -6484,6 +7359,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 11,
+ "filename": "filters.less.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "type",
"val": "\"text/css\"",
@@ -6500,39 +7378,53 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 9,
+ "filename": "filters.less.tokens.json",
"line": 5,
"type": "Text",
"val": "@pad: 15px;",
},
Object {
+ "column": 1,
+ "filename": "filters.less.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 9,
+ "filename": "filters.less.tokens.json",
"line": 6,
"type": "Text",
"val": "body {",
},
Object {
+ "column": 1,
+ "filename": "filters.less.tokens.json",
"line": 7,
"type": "Text",
"val": "
",
},
Object {
+ "column": 9,
+ "filename": "filters.less.tokens.json",
"line": 7,
"type": "Text",
"val": " padding: @pad;",
},
Object {
+ "column": 1,
+ "filename": "filters.less.tokens.json",
"line": 8,
"type": "Text",
"val": "
",
},
Object {
+ "column": 9,
+ "filename": "filters.less.tokens.json",
"line": 8,
"type": "Text",
"val": "}",
@@ -6540,6 +7432,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "filters.less.tokens.json",
"line": 4,
"name": "less",
@@ -6548,6 +7441,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.less.tokens.json",
"isInline": false,
"line": 3,
@@ -6558,6 +7452,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.less.tokens.json",
"isInline": false,
"line": 2,
@@ -6568,6 +7463,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.less.tokens.json",
"isInline": false,
"line": 1,
@@ -6606,17 +7502,23 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 7,
+ "filename": "filters.markdown.tokens.json",
"line": 4,
"type": "Text",
"val": "This is _some_ awesome **markdown**",
},
Object {
+ "column": 1,
+ "filename": "filters.markdown.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "filters.markdown.tokens.json",
"line": 5,
"type": "Text",
"val": "whoop.",
@@ -6624,6 +7526,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.markdown.tokens.json",
"line": 3,
"name": "markdown-it",
@@ -6632,6 +7535,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.markdown.tokens.json",
"isInline": false,
"line": 2,
@@ -6642,6 +7546,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.markdown.tokens.json",
"isInline": false,
"line": 1,
@@ -6679,28 +7584,38 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 3,
"type": "Text",
"val": "(function() {",
},
Object {
+ "column": 1,
+ "filename": "filters.nested.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 4,
"type": "Text",
"val": " console.log(\'test\')",
},
Object {
+ "column": 1,
+ "filename": "filters.nested.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 5,
"type": "Text",
"val": "})()",
@@ -6708,6 +7623,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "filters.nested.tokens.json",
"line": 2,
"name": "uglify-js",
@@ -6716,6 +7632,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.nested.tokens.json",
"line": 2,
"name": "cdata",
@@ -6724,6 +7641,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.nested.tokens.json",
"isInline": false,
"line": 1,
@@ -6757,28 +7675,38 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 8,
"type": "Text",
"val": "(->",
},
Object {
+ "column": 1,
+ "filename": "filters.nested.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 9,
"type": "Text",
"val": " console.log \'test\'",
},
Object {
+ "column": 1,
+ "filename": "filters.nested.tokens.json",
"line": 10,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "filters.nested.tokens.json",
"line": 10,
"type": "Text",
"val": ")()",
@@ -6786,6 +7714,7 @@ Object {
],
"type": "Block",
},
+ "column": 19,
"filename": "filters.nested.tokens.json",
"line": 7,
"name": "coffee-script",
@@ -6794,6 +7723,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "filters.nested.tokens.json",
"line": 7,
"name": "uglify-js",
@@ -6802,6 +7732,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.nested.tokens.json",
"line": 7,
"name": "cdata",
@@ -6810,6 +7741,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.nested.tokens.json",
"isInline": false,
"line": 6,
@@ -6845,6 +7777,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 11,
+ "filename": "filters.stylus.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "type",
"val": "\"text/css\"",
@@ -6861,17 +7796,23 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 9,
+ "filename": "filters.stylus.tokens.json",
"line": 5,
"type": "Text",
"val": "body",
},
Object {
+ "column": 1,
+ "filename": "filters.stylus.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 9,
+ "filename": "filters.stylus.tokens.json",
"line": 6,
"type": "Text",
"val": " padding: 50px",
@@ -6879,6 +7820,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "filters.stylus.tokens.json",
"line": 4,
"name": "stylus",
@@ -6887,6 +7829,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters.stylus.tokens.json",
"isInline": false,
"line": 3,
@@ -6897,6 +7840,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters.stylus.tokens.json",
"isInline": false,
"line": 2,
@@ -6913,6 +7857,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "filters.stylus.tokens.json",
"isInline": false,
"line": 7,
@@ -6923,6 +7868,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters.stylus.tokens.json",
"isInline": false,
"line": 1,
@@ -6942,6 +7888,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "filters-empty.tokens.json",
"isInline": false,
"line": 1,
@@ -6965,6 +7912,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "filters-empty.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "age",
"val": "user.age",
@@ -6982,6 +7932,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "filters-empty.tokens.json",
"line": 6,
"name": "cdata",
@@ -6990,6 +7941,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "filters-empty.tokens.json",
"isInline": false,
"line": 5,
@@ -7000,6 +7952,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "filters-empty.tokens.json",
"key": null,
"line": 4,
@@ -7010,6 +7963,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "filters-empty.tokens.json",
"isInline": false,
"line": 3,
@@ -7029,6 +7983,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "html.tokens.json",
"isInline": false,
"line": 1,
@@ -7037,6 +7992,7 @@ Object {
"val": "var version = 1449104952939",
},
Object {
+ "column": 1,
"filename": "html.tokens.json",
"isHtml": true,
"line": 3,
@@ -7050,6 +8006,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 31,
"filename": "html.tokens.json",
"isInline": true,
"line": 9,
@@ -7058,6 +8015,7 @@ Object {
"val": "version",
},
Object {
+ "column": 41,
"filename": "html.tokens.json",
"isHtml": true,
"line": 9,
@@ -7073,6 +8031,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 3,
"filename": "html.tokens.json",
"line": 12,
"type": "Text",
@@ -7081,6 +8040,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "html.tokens.json",
"isInline": false,
"line": 12,
@@ -7096,6 +8056,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 4,
"filename": "html.tokens.json",
"isHtml": true,
"line": 13,
@@ -7105,6 +8066,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "html.tokens.json",
"isInline": false,
"line": 13,
@@ -7123,6 +8085,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "html5.tokens.json",
"line": 1,
"type": "Doctype",
@@ -7132,11 +8095,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "html5.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "type",
"val": "\'checkbox\'",
},
Object {
+ "column": 24,
+ "filename": "html5.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "checked",
"val": true,
@@ -7148,6 +8117,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "html5.tokens.json",
"isInline": false,
"line": 2,
@@ -7159,11 +8129,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "html5.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "type",
"val": "\'checkbox\'",
},
Object {
+ "column": 24,
+ "filename": "html5.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "checked",
"val": "true",
@@ -7175,6 +8151,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "html5.tokens.json",
"isInline": false,
"line": 3,
@@ -7186,11 +8163,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "html5.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "type",
"val": "\'checkbox\'",
},
Object {
+ "column": 24,
+ "filename": "html5.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "checked",
"val": "false",
@@ -7202,6 +8185,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "html5.tokens.json",
"isInline": false,
"line": 4,
@@ -7223,11 +8207,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "include.script.tokens.json",
+ "line": 1,
"mustEscape": false,
"name": "id",
"val": "\'pet-template\'",
},
Object {
+ "column": 21,
+ "filename": "include.script.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "type",
"val": "\'text/x-template\'",
@@ -7244,7 +8234,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"file": Object {
+ "column": 11,
"filename": "include.script.tokens.json",
"line": 2,
"path": "auxiliary/pet.pug",
@@ -7257,6 +8249,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "include.script.tokens.json",
"isInline": false,
"line": 1,
@@ -7287,6 +8280,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
"filename": "include.yield.nested.tokens.json",
"line": 3,
"type": "Text",
@@ -7295,6 +8289,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "include.yield.nested.tokens.json",
"isInline": false,
"line": 3,
@@ -7310,6 +8305,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 5,
"filename": "include.yield.nested.tokens.json",
"line": 4,
"type": "Text",
@@ -7318,6 +8314,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "include.yield.nested.tokens.json",
"isInline": false,
"line": 4,
@@ -7328,7 +8325,9 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "include.yield.nested.tokens.json",
"line": 2,
"path": "auxiliary/yield-nested.pug",
@@ -7355,7 +8354,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "include-extends-from-root.tokens.json",
"line": 1,
"path": "/auxiliary/extends-from-root.pug",
@@ -7382,7 +8383,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "include-extends-of-common-template.tokens.json",
"line": 1,
"path": "auxiliary/extends-empty-block-1.pug",
@@ -7399,7 +8402,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "include-extends-of-common-template.tokens.json",
"line": 2,
"path": "auxiliary/extends-empty-block-2.pug",
@@ -7426,7 +8431,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "include-extends-relative.tokens.json",
"line": 1,
"path": "../cases/auxiliary/extends-relative.pug",
@@ -7480,6 +8487,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 12,
"filename": "include-only-text.tokens.json",
"line": 5,
"type": "Text",
@@ -7488,6 +8496,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "include-only-text.tokens.json",
"isInline": true,
"line": 5,
@@ -7498,7 +8507,9 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"file": Object {
+ "column": 15,
"filename": "include-only-text.tokens.json",
"line": 4,
"path": "include-only-text-body.pug",
@@ -7511,6 +8522,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "include-only-text.tokens.json",
"isInline": false,
"line": 3,
@@ -7521,6 +8533,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "include-only-text.tokens.json",
"isInline": false,
"line": 2,
@@ -7531,6 +8544,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "include-only-text.tokens.json",
"isInline": false,
"line": 1,
@@ -7549,17 +8563,20 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 3,
"filename": "include-only-text-body.tokens.json",
"line": 1,
"type": "Text",
"val": "The message is \"",
},
Object {
+ "column": 1,
"filename": "include-only-text-body.tokens.json",
"line": 2,
"type": "YieldBlock",
},
Object {
+ "column": 3,
"filename": "include-only-text-body.tokens.json",
"line": 3,
"type": "Text",
@@ -7591,6 +8608,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "include-with-text.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "src",
"val": "\'/caustic.js\'",
@@ -7602,6 +8622,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "include-with-text.tokens.json",
"isInline": false,
"line": 3,
@@ -7613,6 +8634,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "include-with-text.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'/app.js\'",
@@ -7624,6 +8648,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "include-with-text.tokens.json",
"isInline": false,
"line": 4,
@@ -7634,7 +8659,9 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"file": Object {
+ "column": 11,
"filename": "include-with-text.tokens.json",
"line": 2,
"path": "include-with-text-head.pug",
@@ -7647,6 +8674,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "include-with-text.tokens.json",
"isInline": false,
"line": 1,
@@ -7675,6 +8703,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "include-with-text-head.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "type",
"val": "\'text/javascript\'",
@@ -7685,6 +8716,8 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "include-with-text-head.tokens.json",
"line": 3,
"type": "Text",
"val": "alert(\'hello world\');",
@@ -7692,6 +8725,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "include-with-text-head.tokens.json",
"isInline": false,
"line": 2,
@@ -7703,6 +8737,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "include-with-text-head.tokens.json",
"isInline": false,
"line": 1,
@@ -7727,7 +8762,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "includes.tokens.json",
"line": 2,
"path": "auxiliary/mixins.pug",
@@ -7743,6 +8780,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 1,
"filename": "includes.tokens.json",
"line": 4,
"name": "foo",
@@ -7756,7 +8794,9 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 3,
"file": Object {
+ "column": 11,
"filename": "includes.tokens.json",
"line": 7,
"path": "auxiliary/smile.html",
@@ -7768,7 +8808,9 @@ Object {
"type": "RawInclude",
},
Object {
+ "column": 3,
"file": Object {
+ "column": 11,
"filename": "includes.tokens.json",
"line": 8,
"path": "auxiliary/escapes.html",
@@ -7783,6 +8825,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "includes.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "type",
"val": "\"text/javascript\"",
@@ -7793,7 +8838,9 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 5,
"file": Object {
+ "column": 22,
"filename": "includes.tokens.json",
"line": 10,
"path": "auxiliary/includable.js",
@@ -7803,6 +8850,7 @@ Object {
"filters": Array [
Object {
"attrs": Array [],
+ "column": 12,
"filename": "includes.tokens.json",
"line": 10,
"name": "verbatim",
@@ -7815,6 +8863,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "includes.tokens.json",
"isInline": false,
"line": 9,
@@ -7825,6 +8874,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "includes.tokens.json",
"isInline": false,
"line": 6,
@@ -7857,7 +8907,9 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"file": Object {
+ "column": 13,
"filename": "includes-with-ext-js.tokens.json",
"line": 3,
"path": "javascript-new-lines.js",
@@ -7871,6 +8923,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "includes-with-ext-js.tokens.json",
"isInline": true,
"line": 2,
@@ -7881,6 +8934,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "includes-with-ext-js.tokens.json",
"isInline": false,
"line": 1,
@@ -7899,7 +8953,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "inheritance.alert-dialog.tokens.json",
"line": 2,
"path": "auxiliary/dialog.pug",
@@ -7910,6 +8966,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.alert-dialog.tokens.json",
"line": 4,
"mode": "replace",
@@ -7923,6 +8980,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.alert-dialog.tokens.json",
"line": 5,
"type": "Text",
@@ -7931,6 +8989,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.alert-dialog.tokens.json",
"isInline": false,
"line": 5,
@@ -7946,6 +9005,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.alert-dialog.tokens.json",
"line": 6,
"type": "Text",
@@ -7954,6 +9014,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.alert-dialog.tokens.json",
"isInline": false,
"line": 6,
@@ -7989,6 +9050,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.defaults.tokens.json",
"line": 3,
"mode": "replace",
@@ -7998,6 +9060,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "inheritance.defaults.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -8009,6 +9074,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "inheritance.defaults.tokens.json",
"isInline": false,
"line": 4,
@@ -8020,6 +9086,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "inheritance.defaults.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'keymaster.js\'",
@@ -8031,6 +9100,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "inheritance.defaults.tokens.json",
"isInline": false,
"line": 5,
@@ -8042,6 +9112,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "inheritance.defaults.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'caustic.js\'",
@@ -8053,6 +9126,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "inheritance.defaults.tokens.json",
"isInline": false,
"line": 6,
@@ -8066,6 +9140,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.defaults.tokens.json",
"isInline": false,
"line": 2,
@@ -8076,6 +9151,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "inheritance.defaults.tokens.json",
"isInline": false,
"line": 1,
@@ -8094,7 +9170,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 8,
"filename": "inheritance.extend.include.tokens.json",
"line": 2,
"path": "auxiliary/layout.include.pug",
@@ -8105,6 +9183,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.include.tokens.json",
"line": 4,
"mode": "replace",
@@ -8114,6 +9193,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "inheritance.extend.include.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -8125,6 +9207,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.include.tokens.json",
"isInline": false,
"line": 5,
@@ -8136,6 +9219,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.include.tokens.json",
"line": 7,
"mode": "replace",
@@ -8149,6 +9233,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.extend.include.tokens.json",
"line": 8,
"type": "Text",
@@ -8157,6 +9242,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.include.tokens.json",
"isInline": false,
"line": 8,
@@ -8172,6 +9258,7 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.extend.include.tokens.json",
"line": 9,
"type": "Text",
@@ -8180,6 +9267,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.include.tokens.json",
"isInline": false,
"line": 9,
@@ -8191,6 +9279,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.include.tokens.json",
"line": 11,
"mode": "replace",
@@ -8204,6 +9293,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.extend.include.tokens.json",
"line": 12,
"type": "Text",
@@ -8212,6 +9302,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.include.tokens.json",
"isInline": false,
"line": 12,
@@ -8227,6 +9318,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.extend.include.tokens.json",
"line": 13,
"type": "Text",
@@ -8235,6 +9327,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.include.tokens.json",
"isInline": false,
"line": 13,
@@ -8256,7 +9349,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 8,
"filename": "inheritance.extend.mixins.block.tokens.json",
"line": 1,
"path": "auxiliary/inheritance.extend.mixin.block.pug",
@@ -8267,6 +9362,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.mixins.block.tokens.json",
"line": 3,
"mode": "replace",
@@ -8280,6 +9376,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.extend.mixins.block.tokens.json",
"line": 4,
"type": "Text",
@@ -8288,6 +9385,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.mixins.block.tokens.json",
"isInline": false,
"line": 4,
@@ -8309,7 +9407,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 8,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 2,
"path": "auxiliary/layout.pug",
@@ -8327,6 +9427,7 @@ Object {
"nodes": Array [
Object {
"alternate": null,
+ "column": 3,
"consequent": Object {
"filename": "inheritance.extend.mixins.tokens.json",
"line": 6,
@@ -8340,6 +9441,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "inheritance.extend.mixins.tokens.json",
"isInline": true,
"line": 6,
@@ -8350,6 +9452,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "inheritance.extend.mixins.tokens.json",
"isInline": false,
"line": 6,
@@ -8366,6 +9469,7 @@ Object {
"type": "Conditional",
},
Object {
+ "column": 3,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 7,
"type": "MixinBlock",
@@ -8374,12 +9478,14 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 4,
"name": "article",
"type": "Mixin",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 9,
"mode": "replace",
@@ -8401,6 +9507,7 @@ Object {
"line": 11,
"nodes": Array [
Object {
+ "column": 7,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 11,
"type": "Text",
@@ -8409,6 +9516,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "inheritance.extend.mixins.tokens.json",
"isInline": false,
"line": 11,
@@ -8420,6 +9528,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "inheritance.extend.mixins.tokens.json",
"line": 10,
"name": "article",
@@ -8439,7 +9548,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "inheritance.extend.recursive.tokens.json",
"line": 1,
"path": "/auxiliary/inheritance.extend.recursive-parent.pug",
@@ -8450,6 +9561,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.recursive.tokens.json",
"line": 3,
"mode": "replace",
@@ -8463,6 +9575,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 8,
"filename": "inheritance.extend.recursive.tokens.json",
"line": 4,
"type": "Text",
@@ -8471,6 +9584,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "inheritance.extend.recursive.tokens.json",
"isInline": false,
"line": 4,
@@ -8492,7 +9606,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 8,
"filename": "inheritance.extend.tokens.json",
"line": 2,
"path": "auxiliary/layout.pug",
@@ -8503,6 +9619,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.tokens.json",
"line": 4,
"mode": "replace",
@@ -8512,6 +9629,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "inheritance.extend.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -8523,6 +9643,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.tokens.json",
"isInline": false,
"line": 5,
@@ -8534,6 +9655,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.tokens.json",
"line": 7,
"mode": "replace",
@@ -8547,6 +9669,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.extend.tokens.json",
"line": 8,
"type": "Text",
@@ -8555,6 +9678,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.tokens.json",
"isInline": false,
"line": 8,
@@ -8570,6 +9694,7 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.extend.tokens.json",
"line": 9,
"type": "Text",
@@ -8578,6 +9703,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.tokens.json",
"isInline": false,
"line": 9,
@@ -8599,7 +9725,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 8,
"filename": "inheritance.extend.whitespace.tokens.json",
"line": 2,
"path": "auxiliary/layout.pug",
@@ -8610,6 +9738,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.whitespace.tokens.json",
"line": 4,
"mode": "replace",
@@ -8619,6 +9748,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "inheritance.extend.whitespace.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -8630,6 +9762,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.whitespace.tokens.json",
"isInline": false,
"line": 6,
@@ -8641,6 +9774,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "inheritance.extend.whitespace.tokens.json",
"line": 8,
"mode": "replace",
@@ -8654,6 +9788,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.extend.whitespace.tokens.json",
"line": 12,
"type": "Text",
@@ -8662,6 +9797,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.whitespace.tokens.json",
"isInline": false,
"line": 12,
@@ -8677,6 +9813,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.extend.whitespace.tokens.json",
"line": 13,
"type": "Text",
@@ -8685,6 +9822,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.extend.whitespace.tokens.json",
"isInline": false,
"line": 13,
@@ -8706,7 +9844,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "inheritance.tokens.json",
"line": 2,
"path": "auxiliary/layout.pug",
@@ -8717,6 +9857,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "inheritance.tokens.json",
"line": 4,
"mode": "replace",
@@ -8726,6 +9867,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "inheritance.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -8737,6 +9881,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.tokens.json",
"isInline": false,
"line": 5,
@@ -8748,6 +9893,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "inheritance.tokens.json",
"line": 7,
"mode": "replace",
@@ -8761,6 +9907,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 6,
"filename": "inheritance.tokens.json",
"line": 8,
"type": "Text",
@@ -8769,6 +9916,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.tokens.json",
"isInline": false,
"line": 8,
@@ -8784,6 +9932,7 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inheritance.tokens.json",
"line": 9,
"type": "Text",
@@ -8792,6 +9941,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "inheritance.tokens.json",
"isInline": false,
"line": 9,
@@ -8813,6 +9963,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 1,
"mode": "replace",
@@ -8822,12 +9973,14 @@ Object {
},
Object {
"buffer": true,
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 1,
"type": "Comment",
"val": " Main content goes here",
},
Object {
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 2,
"mode": "append",
@@ -8837,12 +9990,14 @@ Object {
},
Object {
"buffer": true,
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 2,
"type": "Comment",
"val": " adding something to content",
},
Object {
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 3,
"mode": "prepend",
@@ -8852,6 +10007,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 1,
"filename": "inline-block-comment.tokens.json",
"line": 3,
"type": "Comment",
@@ -8875,6 +10031,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
"filename": "inline-tag.tokens.json",
"line": 1,
"type": "Text",
@@ -8888,6 +10045,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 17,
"filename": "inline-tag.tokens.json",
"line": 1,
"type": "Text",
@@ -8896,6 +10054,7 @@ Object {
],
"type": "Block",
},
+ "column": 10,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 1,
@@ -8904,6 +10063,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 21,
"filename": "inline-tag.tokens.json",
"line": 1,
"type": "Text",
@@ -8912,6 +10072,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 1,
@@ -8927,17 +10088,23 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 4,
"type": "Text",
"val": "bing",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 5,
"type": "Text",
"val": "",
@@ -8950,6 +10117,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 12,
"filename": "inline-tag.tokens.json",
"line": 5,
"type": "Text",
@@ -8958,6 +10126,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 5,
@@ -8966,17 +10135,23 @@ Object {
"type": "Tag",
},
Object {
+ "column": 16,
+ "filename": "inline-tag.tokens.json",
"line": 5,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 6,
"type": "Text",
"val": "",
@@ -8990,6 +10165,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 11,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 6,
@@ -9000,6 +10176,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 6,
@@ -9008,23 +10185,30 @@ Object {
"type": "Tag",
},
Object {
+ "column": 21,
+ "filename": "inline-tag.tokens.json",
"line": 6,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 7,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 7,
"type": "Text",
"val": "",
},
Object {
"buffer": false,
+ "column": 5,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 7,
@@ -9033,28 +10217,38 @@ Object {
"val": "var foo = \'foo]\'",
},
Object {
+ "column": 24,
+ "filename": "inline-tag.tokens.json",
"line": 7,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 8,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 8,
"type": "Text",
"val": "bong",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 9,
"type": "Text",
"val": "",
@@ -9062,6 +10256,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 3,
@@ -9078,12 +10273,14 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 5,
"filename": "inline-tag.tokens.json",
"line": 11,
"type": "Text",
"val": "bing",
},
Object {
+ "column": 1,
"filename": "inline-tag.tokens.json",
"line": 12,
"type": "Text",
@@ -9091,6 +10288,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "inline-tag.tokens.json",
"line": 12,
"type": "Text",
@@ -9104,6 +10302,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 14,
"filename": "inline-tag.tokens.json",
"line": 12,
"type": "Text",
@@ -9112,6 +10311,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 12,
@@ -9120,12 +10320,14 @@ Object {
"type": "Tag",
},
Object {
+ "column": 18,
"filename": "inline-tag.tokens.json",
"line": 12,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
"filename": "inline-tag.tokens.json",
"line": 13,
"type": "Text",
@@ -9133,6 +10335,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "inline-tag.tokens.json",
"line": 13,
"type": "Text",
@@ -9147,6 +10350,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 13,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 13,
@@ -9157,6 +10361,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 13,
@@ -9165,12 +10370,14 @@ Object {
"type": "Tag",
},
Object {
+ "column": 23,
"filename": "inline-tag.tokens.json",
"line": 13,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
"filename": "inline-tag.tokens.json",
"line": 14,
"type": "Text",
@@ -9178,6 +10385,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "inline-tag.tokens.json",
"line": 14,
"type": "Text",
@@ -9185,6 +10393,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 7,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 14,
@@ -9193,12 +10402,14 @@ Object {
"val": "var foo = \'foo]\'",
},
Object {
+ "column": 26,
"filename": "inline-tag.tokens.json",
"line": 14,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
"filename": "inline-tag.tokens.json",
"line": 15,
"type": "Text",
@@ -9206,6 +10417,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "inline-tag.tokens.json",
"line": 15,
"type": "Text",
@@ -9214,6 +10426,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 10,
@@ -9229,17 +10442,23 @@ Object {
"line": 17,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 18,
"type": "Text",
"val": "#[strong escaped]",
},
Object {
+ "column": 1,
+ "filename": "inline-tag.tokens.json",
"line": 19,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "inline-tag.tokens.json",
"line": 19,
"type": "Text",
"val": "#[",
@@ -9252,6 +10471,7 @@ Object {
"line": 19,
"nodes": Array [
Object {
+ "column": 15,
"filename": "inline-tag.tokens.json",
"line": 19,
"type": "Text",
@@ -9260,6 +10480,7 @@ Object {
],
"type": "Block",
},
+ "column": 8,
"filename": "inline-tag.tokens.json",
"isInline": true,
"line": 19,
@@ -9268,6 +10489,8 @@ Object {
"type": "Tag",
},
Object {
+ "column": 23,
+ "filename": "inline-tag.tokens.json",
"line": 19,
"type": "Text",
"val": "",
@@ -9275,6 +10498,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "inline-tag.tokens.json",
"isInline": false,
"line": 17,
@@ -9301,6 +10525,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
"filename": "intepolated-elements.tokens.json",
"line": 1,
"type": "Text",
@@ -9310,16 +10535,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 1,
"mustEscape": false,
"name": "class",
"val": "\'rho\'",
},
Object {
+ "column": 11,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
},
Object {
+ "column": 21,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "class",
"val": "\'rho--modifier\'",
@@ -9330,6 +10564,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 44,
"filename": "intepolated-elements.tokens.json",
"line": 1,
"type": "Text",
@@ -9338,6 +10573,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "intepolated-elements.tokens.json",
"isInline": true,
"line": 1,
@@ -9346,6 +10582,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 61,
"filename": "intepolated-elements.tokens.json",
"line": 1,
"type": "Text",
@@ -9354,6 +10591,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "intepolated-elements.tokens.json",
"isInline": false,
"line": 1,
@@ -9369,6 +10607,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 3,
"filename": "intepolated-elements.tokens.json",
"line": 2,
"type": "Text",
@@ -9378,16 +10617,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 16,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'rho\'",
},
Object {
+ "column": 21,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
},
Object {
+ "column": 31,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "class",
"val": "\'rho--modifier\'",
@@ -9399,6 +10647,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 15,
"filename": "intepolated-elements.tokens.json",
"isInline": true,
"line": 2,
@@ -9407,6 +10656,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 54,
"filename": "intepolated-elements.tokens.json",
"line": 2,
"type": "Text",
@@ -9415,6 +10665,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "intepolated-elements.tokens.json",
"isInline": false,
"line": 2,
@@ -9430,6 +10681,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 3,
"filename": "intepolated-elements.tokens.json",
"line": 3,
"type": "Text",
@@ -9439,16 +10691,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 16,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "class",
"val": "\'rho\'",
},
Object {
+ "column": 21,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
},
Object {
+ "column": 31,
+ "filename": "intepolated-elements.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "class",
"val": "\'rho--modifier\'",
@@ -9459,6 +10720,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 54,
"filename": "intepolated-elements.tokens.json",
"line": 3,
"type": "Text",
@@ -9467,6 +10729,7 @@ Object {
],
"type": "Block",
},
+ "column": 15,
"filename": "intepolated-elements.tokens.json",
"isInline": true,
"line": 3,
@@ -9475,6 +10738,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 71,
"filename": "intepolated-elements.tokens.json",
"line": 3,
"type": "Text",
@@ -9483,6 +10747,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "intepolated-elements.tokens.json",
"isInline": false,
"line": 3,
@@ -9510,6 +10775,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "interpolated-mixin.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "href",
"val": "url",
@@ -9521,6 +10789,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 14,
"filename": "interpolated-mixin.tokens.json",
"isInline": true,
"line": 2,
@@ -9531,6 +10800,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "interpolated-mixin.tokens.json",
"isInline": true,
"line": 2,
@@ -9542,6 +10812,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "interpolated-mixin.tokens.json",
"line": 1,
"name": "linkit",
@@ -9555,6 +10826,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 3,
"filename": "interpolated-mixin.tokens.json",
"line": 4,
"type": "Text",
@@ -9566,12 +10838,14 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 21,
"filename": "interpolated-mixin.tokens.json",
"line": 4,
"name": "linkit",
"type": "Mixin",
},
Object {
+ "column": 52,
"filename": "interpolated-mixin.tokens.json",
"line": 4,
"type": "Text",
@@ -9580,6 +10854,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "interpolated-mixin.tokens.json",
"isInline": false,
"line": 4,
@@ -9599,6 +10874,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "interpolation.escape.tokens.json",
"isInline": false,
"line": 2,
@@ -9614,12 +10890,14 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 5,
"filename": "interpolation.escape.tokens.json",
"line": 4,
"type": "Text",
"val": "some",
},
Object {
+ "column": 1,
"filename": "interpolation.escape.tokens.json",
"line": 5,
"type": "Text",
@@ -9627,12 +10905,14 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "interpolation.escape.tokens.json",
"line": 5,
"type": "Text",
"val": "#{text}",
},
Object {
+ "column": 1,
"filename": "interpolation.escape.tokens.json",
"line": 6,
"type": "Text",
@@ -9640,12 +10920,14 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "interpolation.escape.tokens.json",
"line": 6,
"type": "Text",
"val": "here",
},
Object {
+ "column": 1,
"filename": "interpolation.escape.tokens.json",
"line": 7,
"type": "Text",
@@ -9653,6 +10935,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "interpolation.escape.tokens.json",
"line": 7,
"type": "Text",
@@ -9660,6 +10943,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 11,
"filename": "interpolation.escape.tokens.json",
"isInline": true,
"line": 7,
@@ -9670,6 +10954,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "interpolation.escape.tokens.json",
"isInline": false,
"line": 3,
@@ -9688,7 +10973,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "layout.append.tokens.json",
"line": 2,
"path": "../fixtures/append/app-layout.pug",
@@ -9699,6 +10986,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "layout.append.tokens.json",
"line": 4,
"mode": "append",
@@ -9708,6 +10996,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.append.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'foo.js\'",
@@ -9719,6 +11010,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.append.tokens.json",
"isInline": false,
"line": 5,
@@ -9730,6 +11022,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.append.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'bar.js\'",
@@ -9741,6 +11036,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.append.tokens.json",
"isInline": false,
"line": 6,
@@ -9762,7 +11058,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "layout.append.without-block.tokens.json",
"line": 2,
"path": "../fixtures/append-without-block/app-layout.pug",
@@ -9773,6 +11071,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "layout.append.without-block.tokens.json",
"line": 4,
"mode": "append",
@@ -9782,6 +11081,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.append.without-block.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'foo.js\'",
@@ -9793,6 +11095,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.append.without-block.tokens.json",
"isInline": false,
"line": 5,
@@ -9804,6 +11107,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.append.without-block.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'bar.js\'",
@@ -9815,6 +11121,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.append.without-block.tokens.json",
"isInline": false,
"line": 6,
@@ -9836,7 +11143,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 1,
"path": "../fixtures/multi-append-prepend-block/redefine.pug",
@@ -9847,6 +11156,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 3,
"mode": "append",
@@ -9856,11 +11166,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 4,
"mustEscape": false,
"name": "class",
"val": "\'first\'",
},
Object {
+ "column": 9,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 4,
"mustEscape": false,
"name": "class",
"val": "\'append\'",
@@ -9871,6 +11187,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 17,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 4,
"type": "Text",
@@ -9879,6 +11196,7 @@ Object {
],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 4,
@@ -9890,6 +11208,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 6,
"mode": "prepend",
@@ -9899,11 +11218,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 7,
"mustEscape": false,
"name": "class",
"val": "\'first\'",
},
Object {
+ "column": 9,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 7,
"mustEscape": false,
"name": "class",
"val": "\'prepend\'",
@@ -9914,6 +11239,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 18,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 7,
"type": "Text",
@@ -9922,6 +11248,7 @@ Object {
],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 7,
@@ -9933,6 +11260,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 9,
"mode": "append",
@@ -9942,11 +11270,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 10,
"mustEscape": false,
"name": "class",
"val": "\'last\'",
},
Object {
+ "column": 8,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 10,
"mustEscape": false,
"name": "class",
"val": "\'append\'",
@@ -9957,6 +11291,7 @@ Object {
"line": 10,
"nodes": Array [
Object {
+ "column": 16,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 10,
"type": "Text",
@@ -9965,6 +11300,7 @@ Object {
],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 10,
@@ -9976,6 +11312,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 12,
"mode": "prepend",
@@ -9985,11 +11322,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'last\'",
},
Object {
+ "column": 8,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'prepend\'",
@@ -10000,6 +11343,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 17,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 13,
"type": "Text",
@@ -10008,6 +11352,7 @@ Object {
],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 13,
@@ -10019,6 +11364,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 15,
"mode": "append",
@@ -10028,6 +11374,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 16,
"mustEscape": true,
"name": "src",
"val": "\'jquery.js\'",
@@ -10039,6 +11388,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 16,
@@ -10050,6 +11400,7 @@ Object {
"type": "NamedBlock",
},
Object {
+ "column": 1,
"filename": "layout.multi.append.prepend.block.tokens.json",
"line": 18,
"mode": "prepend",
@@ -10059,6 +11410,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "layout.multi.append.prepend.block.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "src",
"val": "\'foo.js\'",
@@ -10070,6 +11424,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 2,
"filename": "layout.multi.append.prepend.block.tokens.json",
"isInline": false,
"line": 19,
@@ -10091,7 +11446,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "layout.prepend.tokens.json",
"line": 2,
"path": "../fixtures/prepend/app-layout.pug",
@@ -10102,6 +11459,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "layout.prepend.tokens.json",
"line": 4,
"mode": "prepend",
@@ -10111,6 +11469,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.prepend.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'foo.js\'",
@@ -10122,6 +11483,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.prepend.tokens.json",
"isInline": false,
"line": 5,
@@ -10133,6 +11495,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.prepend.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'bar.js\'",
@@ -10144,6 +11509,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.prepend.tokens.json",
"isInline": false,
"line": 6,
@@ -10165,7 +11531,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "layout.prepend.without-block.tokens.json",
"line": 2,
"path": "../fixtures/prepend-without-block/app-layout.pug",
@@ -10176,6 +11544,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "layout.prepend.without-block.tokens.json",
"line": 4,
"mode": "prepend",
@@ -10185,6 +11554,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.prepend.without-block.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'foo.js\'",
@@ -10196,6 +11568,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.prepend.without-block.tokens.json",
"isInline": false,
"line": 5,
@@ -10207,6 +11580,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "layout.prepend.without-block.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "src",
"val": "\'bar.js\'",
@@ -10218,6 +11594,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "layout.prepend.without-block.tokens.json",
"isInline": false,
"line": 6,
@@ -10248,11 +11625,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'centered\'",
},
Object {
+ "column": 16,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "id",
"val": "attributes.id",
@@ -10271,6 +11654,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "class",
"val": "attributes.class",
@@ -10282,6 +11668,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 33,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 4,
@@ -10292,6 +11679,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 4,
@@ -10303,6 +11691,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 3,
@@ -10311,6 +11700,7 @@ Object {
"val": "if (title)",
},
Object {
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"line": 5,
"type": "MixinBlock",
@@ -10324,6 +11714,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 7,
"mustEscape": false,
"name": "class",
"val": "\'footer\'",
@@ -10337,6 +11730,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 11,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "href",
"val": "attributes.href",
@@ -10347,6 +11743,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 33,
"filename": "mixin.attrs.tokens.json",
"line": 8,
"type": "Text",
@@ -10355,6 +11752,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 8,
@@ -10365,6 +11763,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 7,
@@ -10376,6 +11775,7 @@ Object {
"type": "Block",
},
"buffer": false,
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 6,
@@ -10386,6 +11786,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 2,
@@ -10397,6 +11798,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 1,
"name": "centered",
@@ -10412,6 +11814,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 11,
"mustEscape": false,
"name": "class",
"val": "\'stretch\'",
@@ -10424,10 +11829,19 @@ Object {
Object {
"args": "title",
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 31,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 12,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 21,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 12,
"mustEscape": false,
"name": "class",
"val": "\'highlight\'",
@@ -10438,6 +11852,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"line": 13,
"type": "MixinBlock",
@@ -10446,6 +11861,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"line": 12,
"name": "centered",
@@ -10454,6 +11870,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 11,
@@ -10465,6 +11882,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 10,
"name": "main",
@@ -10478,10 +11896,19 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 13,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 16,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 16,
"mustEscape": false,
"name": "class",
"val": "\'bottom\'",
@@ -10492,6 +11919,7 @@ Object {
"line": 16,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"line": 17,
"type": "MixinBlock",
@@ -10499,6 +11927,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 16,
@@ -10510,6 +11939,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 15,
"name": "bottom",
@@ -10527,6 +11957,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 20,
"mustEscape": false,
"name": "id",
"val": "\'First\'",
@@ -10537,6 +11970,7 @@ Object {
"line": 20,
"nodes": Array [
Object {
+ "column": 19,
"filename": "mixin.attrs.tokens.json",
"line": 20,
"type": "Text",
@@ -10546,6 +11980,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 20,
"name": "centered",
@@ -10556,6 +11991,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 25,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 21,
"mustEscape": false,
"name": "id",
"val": "\'Second\'",
@@ -10573,6 +12011,7 @@ Object {
"line": 22,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"line": 22,
"type": "Text",
@@ -10581,6 +12020,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 22,
@@ -10592,6 +12032,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 21,
"name": "centered",
@@ -10602,21 +12043,33 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 25,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 23,
"mustEscape": false,
"name": "id",
"val": "\'Third\'",
},
Object {
+ "column": 31,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 23,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
},
Object {
+ "column": 36,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 23,
"mustEscape": true,
"name": "href",
"val": "\'menu.html\'",
},
Object {
+ "column": 54,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 23,
"mustEscape": true,
"name": "class",
"val": "\'bar\'",
@@ -10634,6 +12087,7 @@ Object {
"line": 24,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"line": 24,
"type": "Text",
@@ -10642,6 +12096,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 24,
@@ -10653,6 +12108,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 23,
"name": "centered",
@@ -10663,6 +12119,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 22,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 25,
"mustEscape": true,
"name": "href",
"val": "\'#\'",
@@ -10680,6 +12139,7 @@ Object {
"line": 26,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"line": 26,
"type": "Text",
@@ -10688,6 +12148,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 26,
@@ -10699,6 +12160,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 25,
"name": "main",
@@ -10709,26 +12171,41 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 27,
"mustEscape": false,
"name": "class",
"val": "\'foo\'",
},
Object {
+ "column": 15,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 27,
"mustEscape": true,
"name": "class",
"val": "\'bar\'",
},
Object {
+ "column": 28,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 27,
"mustEscape": true,
"name": "name",
"val": "\'end\'",
},
Object {
+ "column": 40,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 27,
"mustEscape": true,
"name": "id",
"val": "\'Last\'",
},
Object {
+ "column": 51,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 27,
"mustEscape": true,
"name": "data-attr",
"val": "\'baz\'",
@@ -10746,6 +12223,7 @@ Object {
"line": 28,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.attrs.tokens.json",
"line": 28,
"type": "Text",
@@ -10754,6 +12232,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 28,
@@ -10765,6 +12244,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 27,
"name": "bottom",
@@ -10775,6 +12255,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 11,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 29,
"mustEscape": true,
"name": "class",
"val": "[\'class1\', \'class2\']",
@@ -10782,6 +12265,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"line": 29,
"name": "bottom",
@@ -10790,6 +12274,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 19,
@@ -10805,20 +12290,35 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 38,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 32,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 32,
"mustEscape": false,
"name": "class",
"val": "\'thing\'",
},
Object {
+ "column": 13,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 32,
"mustEscape": true,
"name": "attr1",
"val": "\'foo\'",
},
Object {
+ "column": 26,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 32,
"mustEscape": true,
"name": "attr2",
"val": "\'bar\'",
@@ -10830,6 +12330,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 32,
@@ -10841,6 +12342,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 31,
"name": "foo",
@@ -10848,6 +12350,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 34,
@@ -10857,6 +12360,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 35,
@@ -10869,26 +12373,41 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 36,
"mustEscape": true,
"name": "attr3",
"val": "\'baz\'",
},
Object {
+ "column": 18,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 36,
"mustEscape": true,
"name": "data-foo",
"val": "val",
},
Object {
+ "column": 31,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 36,
"mustEscape": false,
"name": "data-bar",
"val": "val",
},
Object {
+ "column": 45,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 36,
"mustEscape": true,
"name": "class",
"val": "classes",
},
Object {
+ "column": 59,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 36,
"mustEscape": false,
"name": "class",
"val": "\'thunk\'",
@@ -10896,6 +12415,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 36,
"name": "foo",
@@ -10903,6 +12423,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 38,
"type": "Comment",
@@ -10916,7 +12437,13 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 6,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 40,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [],
"block": Object {
@@ -10925,6 +12452,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 29,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 40,
@@ -10935,6 +12463,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 40,
@@ -10946,6 +12475,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 39,
"name": "work_filmstrip_item",
@@ -10956,11 +12486,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 31,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 41,
"mustEscape": true,
"name": "data-profile",
"val": "\'profile\'",
},
Object {
+ "column": 56,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 41,
"mustEscape": true,
"name": "data-creator-name",
"val": "\'name\'",
@@ -10968,6 +12504,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 41,
"name": "work_filmstrip_item",
@@ -10988,6 +12525,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 4,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 44,
@@ -10998,6 +12536,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 44,
@@ -11014,6 +12553,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 4,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 45,
@@ -11024,6 +12564,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 45,
@@ -11040,6 +12581,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 4,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 46,
@@ -11050,6 +12592,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 46,
@@ -11066,6 +12609,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 4,
"filename": "mixin.attrs.tokens.json",
"isInline": true,
"line": 47,
@@ -11076,6 +12620,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.attrs.tokens.json",
"isInline": false,
"line": 47,
@@ -11087,6 +12632,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 43,
"name": "my-mixin",
@@ -11097,11 +12643,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 50,
"mustEscape": true,
"name": "attr3",
"val": "\"qux\"",
},
Object {
+ "column": 3,
+ "filename": "mixin.attrs.tokens.json",
+ "line": 51,
"mustEscape": true,
"name": "class",
"val": "\"baz\"",
@@ -11109,6 +12661,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 49,
"name": "foo",
@@ -11125,6 +12678,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixin.attrs.tokens.json",
"line": 54,
"name": "my-mixin",
@@ -11150,6 +12704,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "class",
"val": "\'article\'",
@@ -11168,6 +12725,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": true,
"line": 4,
@@ -11178,6 +12736,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 4,
@@ -11186,6 +12745,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 5,
"type": "MixinBlock",
@@ -11193,6 +12753,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 3,
@@ -11204,6 +12765,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 2,
"name": "article",
@@ -11239,6 +12801,7 @@ Object {
"line": 9,
"nodes": Array [
Object {
+ "column": 24,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 9,
"type": "Text",
@@ -11247,6 +12810,7 @@ Object {
],
"type": "Block",
},
+ "column": 22,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 9,
@@ -11258,6 +12822,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 9,
"name": "article",
@@ -11266,6 +12831,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 8,
@@ -11276,6 +12842,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 7,
@@ -11293,6 +12860,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
+ "line": 12,
"mustEscape": false,
"name": "class",
"val": "\'article\'",
@@ -11311,6 +12881,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": true,
"line": 13,
@@ -11321,6 +12892,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 13,
@@ -11336,6 +12908,7 @@ Object {
"line": 14,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 15,
"type": "MixinBlock",
@@ -11343,6 +12916,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 14,
@@ -11353,6 +12927,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 12,
@@ -11364,6 +12939,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 11,
"name": "article",
@@ -11392,50 +12968,68 @@ Object {
"line": 19,
"nodes": Array [
Object {
+ "column": 7,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 20,
"type": "Text",
"val": "I\'m a much longer",
},
Object {
+ "column": 1,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 21,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 21,
"type": "Text",
"val": "text-only article,",
},
Object {
+ "column": 1,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 22,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 22,
"type": "Text",
"val": "but you can still",
},
Object {
+ "column": 1,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 23,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 23,
"type": "Text",
"val": "inline html tags",
},
Object {
+ "column": 1,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 24,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "mixin.block-tag-behaviour.tokens.json",
"line": 24,
"type": "Text",
"val": "in me if you want.",
@@ -11444,6 +13038,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.block-tag-behaviour.tokens.json",
"line": 19,
"name": "article",
@@ -11453,6 +13048,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 18,
@@ -11463,6 +13059,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.block-tag-behaviour.tokens.json",
"isInline": false,
"line": 17,
@@ -11490,11 +13087,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "method",
"val": "method",
},
Object {
+ "column": 23,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "action",
"val": "action",
@@ -11506,6 +13109,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 5,
@@ -11517,16 +13121,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 11,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "type",
"val": "\'hidden\'",
},
Object {
+ "column": 26,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "name",
"val": "\'_csrf\'",
},
Object {
+ "column": 40,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "value",
"val": "csrf_token_from_somewhere",
@@ -11538,6 +13151,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 6,
@@ -11546,6 +13160,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 7,
"type": "MixinBlock",
@@ -11553,6 +13168,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 4,
@@ -11564,6 +13180,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 3,
"name": "form",
@@ -11595,16 +13212,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "type",
"val": "\'text\'",
},
Object {
+ "column": 26,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "name",
"val": "\'query\'",
},
Object {
+ "column": 40,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "placeholder",
"val": "\'Search\'",
@@ -11616,6 +13242,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 12,
@@ -11627,11 +13254,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "type",
"val": "\'submit\'",
},
Object {
+ "column": 28,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "value",
"val": "\'Search\'",
@@ -11643,6 +13276,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 13,
@@ -11654,6 +13288,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 11,
"name": "form",
@@ -11662,6 +13297,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 10,
@@ -11672,6 +13308,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 9,
@@ -11705,16 +13342,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 18,
"mustEscape": true,
"name": "type",
"val": "\'text\'",
},
Object {
+ "column": 26,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 18,
"mustEscape": true,
"name": "name",
"val": "\'query\'",
},
Object {
+ "column": 40,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 18,
"mustEscape": true,
"name": "placeholder",
"val": "\'Search\'",
@@ -11726,6 +13372,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 18,
@@ -11737,11 +13384,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 13,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "type",
"val": "\'submit\'",
},
Object {
+ "column": 28,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "value",
"val": "\'Search\'",
@@ -11753,6 +13406,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 19,
@@ -11764,6 +13418,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 17,
"name": "form",
@@ -11772,6 +13427,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 16,
@@ -11782,6 +13438,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 15,
@@ -11809,6 +13466,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 23,
"name": "form",
@@ -11817,6 +13475,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 22,
@@ -11827,6 +13486,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 21,
@@ -11844,6 +13504,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 26,
"mustEscape": false,
"name": "id",
"val": "\'bar\'",
@@ -11854,6 +13517,7 @@ Object {
"line": 26,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 27,
"type": "MixinBlock",
@@ -11861,6 +13525,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 26,
@@ -11872,6 +13537,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 25,
"name": "bar",
@@ -11887,6 +13553,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 30,
"mustEscape": false,
"name": "id",
"val": "\'foo\'",
@@ -11905,6 +13574,7 @@ Object {
"line": 31,
"nodes": Array [
Object {
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"line": 32,
"type": "MixinBlock",
@@ -11913,6 +13583,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 31,
"name": "bar",
@@ -11921,6 +13592,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 30,
@@ -11932,6 +13604,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 29,
"name": "foo",
@@ -11953,6 +13626,7 @@ Object {
"line": 35,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 35,
"type": "Text",
@@ -11961,6 +13635,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 35,
@@ -11976,6 +13651,7 @@ Object {
"line": 36,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 36,
"type": "Text",
@@ -11984,6 +13660,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 36,
@@ -11999,6 +13676,7 @@ Object {
"line": 37,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"line": 37,
"type": "Text",
@@ -12007,6 +13685,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 37,
@@ -12018,6 +13697,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 34,
"name": "foo",
@@ -12033,6 +13713,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "mixin.blocks.tokens.json",
+ "line": 41,
"mustEscape": false,
"name": "id",
"val": "\'baz\'",
@@ -12043,6 +13726,7 @@ Object {
"line": 41,
"nodes": Array [
Object {
+ "column": 9,
"filename": "mixin.blocks.tokens.json",
"line": 42,
"type": "MixinBlock",
@@ -12050,6 +13734,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixin.blocks.tokens.json",
"isInline": false,
"line": 41,
@@ -12061,6 +13746,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 40,
"name": "baz",
@@ -12076,6 +13762,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "mixin.blocks.tokens.json",
"isInline": true,
"line": 44,
@@ -12087,6 +13774,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 1,
"filename": "mixin.blocks.tokens.json",
"line": 44,
"name": "baz",
@@ -12110,10 +13798,19 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 8,
+ "filename": "mixin.merge.tokens.json",
+ "line": 2,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 4,
+ "filename": "mixin.merge.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'bar\'",
@@ -12124,6 +13821,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 32,
"filename": "mixin.merge.tokens.json",
"line": 2,
"type": "Text",
@@ -12132,6 +13830,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"isInline": false,
"line": 2,
@@ -12141,15 +13840,27 @@ Object {
},
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 13,
+ "filename": "mixin.merge.tokens.json",
+ "line": 3,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 4,
+ "filename": "mixin.merge.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "class",
"val": "\'baz\'",
},
Object {
+ "column": 8,
+ "filename": "mixin.merge.tokens.json",
+ "line": 3,
"mustEscape": false,
"name": "class",
"val": "\'quux\'",
@@ -12160,6 +13871,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 37,
"filename": "mixin.merge.tokens.json",
"line": 3,
"type": "Text",
@@ -12168,6 +13880,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"isInline": false,
"line": 3,
@@ -12177,7 +13890,13 @@ Object {
},
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 4,
+ "filename": "mixin.merge.tokens.json",
+ "line": 4,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [],
"block": Object {
@@ -12185,6 +13904,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 28,
"filename": "mixin.merge.tokens.json",
"line": 4,
"type": "Text",
@@ -12193,6 +13913,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"isInline": false,
"line": 4,
@@ -12202,15 +13923,27 @@ Object {
},
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 8,
+ "filename": "mixin.merge.tokens.json",
+ "line": 5,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [
Object {
+ "column": 4,
+ "filename": "mixin.merge.tokens.json",
+ "line": 5,
"mustEscape": false,
"name": "class",
"val": "\'bar\'",
},
Object {
+ "column": 32,
+ "filename": "mixin.merge.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "class",
"val": "\"baz\"",
@@ -12221,6 +13954,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 45,
"filename": "mixin.merge.tokens.json",
"line": 5,
"type": "Text",
@@ -12229,6 +13963,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"isInline": false,
"line": 5,
@@ -12240,6 +13975,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin.merge.tokens.json",
"line": 1,
"name": "foo",
@@ -12257,6 +13993,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 8,
"mustEscape": false,
"name": "class",
"val": "\'hello\'",
@@ -12264,6 +14003,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 8,
"name": "foo",
@@ -12274,6 +14014,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 9,
"mustEscape": false,
"name": "id",
"val": "\'world\'",
@@ -12281,6 +14024,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 9,
"name": "foo",
@@ -12291,11 +14035,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 10,
"mustEscape": false,
"name": "class",
"val": "\'hello\'",
},
Object {
+ "column": 13,
+ "filename": "mixin.merge.tokens.json",
+ "line": 10,
"mustEscape": false,
"name": "id",
"val": "\'world\'",
@@ -12303,6 +14053,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 10,
"name": "foo",
@@ -12313,11 +14064,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 11,
"mustEscape": false,
"name": "class",
"val": "\'hello\'",
},
Object {
+ "column": 13,
+ "filename": "mixin.merge.tokens.json",
+ "line": 11,
"mustEscape": false,
"name": "class",
"val": "\'world\'",
@@ -12325,6 +14082,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 11,
"name": "foo",
@@ -12335,6 +14093,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "mixin.merge.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "class",
"val": "\"hello\"",
@@ -12342,6 +14103,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 12,
"name": "foo",
@@ -12352,11 +14114,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'hello\'",
},
Object {
+ "column": 14,
+ "filename": "mixin.merge.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "class",
"val": "\"world\"",
@@ -12364,6 +14132,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 13,
"name": "foo",
@@ -12375,6 +14144,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 14,
"name": "foo",
@@ -12383,11 +14153,18 @@ Object {
Object {
"args": null,
"attributeBlocks": Array [
- "{class: \"hello\"}",
+ Object {
+ "column": 7,
+ "filename": "mixin.merge.tokens.json",
+ "line": 15,
+ "type": "AttributeBlock",
+ "val": "{class: \"hello\"}",
+ },
],
"attrs": Array [],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixin.merge.tokens.json",
"line": 15,
"name": "foo",
@@ -12396,6 +14173,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin.merge.tokens.json",
"isInline": false,
"line": 7,
@@ -12420,7 +14198,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "mixin-at-end-of-file.tokens.json",
"line": 1,
"path": "./auxiliary/mixin-at-end-of-file.pug",
@@ -12446,6 +14226,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin-at-end-of-file.tokens.json",
"line": 4,
"type": "Text",
@@ -12454,6 +14235,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin-at-end-of-file.tokens.json",
"isInline": false,
"line": 4,
@@ -12465,6 +14247,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 1,
"filename": "mixin-at-end-of-file.tokens.json",
"line": 3,
"name": "slide",
@@ -12494,6 +14277,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin-block-with-space.tokens.json",
"line": 3,
"type": "MixinBlock",
@@ -12501,6 +14285,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin-block-with-space.tokens.json",
"isInline": false,
"line": 2,
@@ -12512,6 +14297,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin-block-with-space.tokens.json",
"line": 1,
"name": "m",
@@ -12526,6 +14312,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 5,
"filename": "mixin-block-with-space.tokens.json",
"line": 6,
"type": "Text",
@@ -12535,6 +14322,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 1,
"filename": "mixin-block-with-space.tokens.json",
"line": 5,
"name": "m",
@@ -12565,6 +14353,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 5,
"filename": "mixin-hoist.tokens.json",
"isInline": true,
"line": 3,
@@ -12575,6 +14364,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin-hoist.tokens.json",
"isInline": false,
"line": 3,
@@ -12586,6 +14376,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixin-hoist.tokens.json",
"line": 2,
"name": "foo",
@@ -12611,6 +14402,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 5,
"filename": "mixin-hoist.tokens.json",
"line": 7,
"name": "foo",
@@ -12619,6 +14411,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixin-hoist.tokens.json",
"isInline": false,
"line": 6,
@@ -12629,6 +14422,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixin-hoist.tokens.json",
"isInline": false,
"line": 5,
@@ -12648,6 +14442,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "mixin-via-include.tokens.json",
"line": 1,
"type": "Comment",
@@ -12660,7 +14455,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "mixin-via-include.tokens.json",
"line": 3,
"path": "../fixtures/mixin-include.pug",
@@ -12676,6 +14473,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixin-via-include.tokens.json",
"line": 5,
"name": "bang",
@@ -12718,6 +14516,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 9,
"filename": "mixins.rest-args.tokens.json",
"isInline": true,
"line": 4,
@@ -12728,6 +14527,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "mixins.rest-args.tokens.json",
"isInline": false,
"line": 4,
@@ -12738,6 +14538,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.rest-args.tokens.json",
"key": null,
"line": 3,
@@ -12748,6 +14549,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"expr": "tag",
"filename": "mixins.rest-args.tokens.json",
"isInline": false,
@@ -12759,6 +14561,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins.rest-args.tokens.json",
"line": 1,
"name": "list",
@@ -12770,6 +14573,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixins.rest-args.tokens.json",
"line": 6,
"name": "list",
@@ -12795,6 +14599,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixins.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'comment\'",
@@ -12813,6 +14620,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "mixins.tokens.json",
"isInline": true,
"line": 3,
@@ -12823,6 +14631,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 3,
@@ -12834,6 +14643,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixins.tokens.json",
+ "line": 4,
"mustEscape": false,
"name": "class",
"val": "\'body\'",
@@ -12845,6 +14657,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 11,
"filename": "mixins.tokens.json",
"isInline": true,
"line": 4,
@@ -12855,6 +14668,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 4,
@@ -12865,6 +14679,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 2,
@@ -12876,6 +14691,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins.tokens.json",
"line": 1,
"name": "comment",
@@ -12891,6 +14707,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixins.tokens.json",
+ "line": 8,
"mustEscape": false,
"name": "class",
"val": "\'comment\'",
@@ -12909,6 +14728,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "mixins.tokens.json",
"isInline": true,
"line": 9,
@@ -12919,6 +14739,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 9,
@@ -12930,6 +14751,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixins.tokens.json",
+ "line": 10,
"mustEscape": false,
"name": "class",
"val": "\'body\'",
@@ -12941,6 +14765,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 11,
"filename": "mixins.tokens.json",
"isInline": true,
"line": 10,
@@ -12951,6 +14776,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 10,
@@ -12961,6 +14787,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 8,
@@ -12972,6 +14799,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins.tokens.json",
"line": 7,
"name": "comment",
@@ -12981,6 +14809,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 1,
+ "filename": "mixins.tokens.json",
+ "line": 12,
"mustEscape": false,
"name": "id",
"val": "\'user\'",
@@ -12998,6 +14829,7 @@ Object {
"line": 13,
"nodes": Array [
Object {
+ "column": 6,
"filename": "mixins.tokens.json",
"line": 13,
"type": "Text",
@@ -13006,6 +14838,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 13,
@@ -13017,6 +14850,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixins.tokens.json",
+ "line": 14,
"mustEscape": false,
"name": "class",
"val": "\'comments\'",
@@ -13033,6 +14869,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 5,
"filename": "mixins.tokens.json",
"line": 15,
"name": "comment",
@@ -13041,6 +14878,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 14,
@@ -13051,6 +14889,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 12,
@@ -13079,6 +14918,7 @@ Object {
"line": 20,
"nodes": Array [
Object {
+ "column": 8,
"filename": "mixins.tokens.json",
"line": 20,
"type": "Text",
@@ -13087,6 +14927,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 20,
@@ -13102,6 +14943,7 @@ Object {
"line": 21,
"nodes": Array [
Object {
+ "column": 8,
"filename": "mixins.tokens.json",
"line": 21,
"type": "Text",
@@ -13110,6 +14952,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 21,
@@ -13125,6 +14968,7 @@ Object {
"line": 22,
"nodes": Array [
Object {
+ "column": 8,
"filename": "mixins.tokens.json",
"line": 22,
"type": "Text",
@@ -13133,6 +14977,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 22,
@@ -13143,6 +14988,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 19,
@@ -13154,6 +15000,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins.tokens.json",
"line": 18,
"name": "list",
@@ -13172,6 +15019,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixins.tokens.json",
"line": 25,
"name": "list",
@@ -13183,6 +15031,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 3,
"filename": "mixins.tokens.json",
"line": 26,
"name": "list",
@@ -13191,6 +15040,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 24,
@@ -13208,6 +15058,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 6,
+ "filename": "mixins.tokens.json",
+ "line": 29,
"mustEscape": false,
"name": "id",
"val": "\'interpolation\'",
@@ -13219,6 +15072,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 20,
"filename": "mixins.tokens.json",
"isInline": true,
"line": 29,
@@ -13229,6 +15083,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 29,
@@ -13240,6 +15095,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins.tokens.json",
"line": 28,
"name": "foobar",
@@ -13247,6 +15103,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "mixins.tokens.json",
"isInline": false,
"line": 31,
@@ -13260,6 +15117,7 @@ Object {
"attrs": Array [],
"block": null,
"call": true,
+ "column": 1,
"filename": "mixins.tokens.json",
"line": 32,
"name": "#{\'foo\' + suffix}",
@@ -13285,6 +15143,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "mixins-unused.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'wtf\'",
@@ -13295,6 +15156,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 8,
"filename": "mixins-unused.tokens.json",
"line": 2,
"type": "Text",
@@ -13303,6 +15165,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "mixins-unused.tokens.json",
"isInline": false,
"line": 2,
@@ -13314,6 +15177,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "mixins-unused.tokens.json",
"line": 1,
"name": "never-called",
@@ -13328,6 +15192,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "mixins-unused.tokens.json",
"isInline": false,
"line": 3,
@@ -13353,6 +15218,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 14,
"filename": "namespaces.tokens.json",
"line": 1,
"type": "Text",
@@ -13361,6 +15227,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "namespaces.tokens.json",
"isInline": false,
"line": 1,
@@ -13372,6 +15239,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 5,
+ "filename": "namespaces.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "fb:foo",
"val": "\'bar\'",
@@ -13383,6 +15253,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "namespaces.tokens.json",
"isInline": false,
"line": 2,
@@ -13415,6 +15286,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 6,
"filename": "nesting.tokens.json",
"line": 2,
"type": "Text",
@@ -13423,6 +15295,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 2,
@@ -13438,6 +15311,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 6,
"filename": "nesting.tokens.json",
"line": 3,
"type": "Text",
@@ -13446,6 +15320,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 3,
@@ -13475,6 +15350,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 12,
"filename": "nesting.tokens.json",
"line": 6,
"type": "Text",
@@ -13483,6 +15359,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 6,
@@ -13498,6 +15375,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 12,
"filename": "nesting.tokens.json",
"line": 7,
"type": "Text",
@@ -13506,6 +15384,7 @@ Object {
],
"type": "Block",
},
+ "column": 9,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 7,
@@ -13516,6 +15395,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 5,
@@ -13526,6 +15406,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 4,
@@ -13541,6 +15422,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 6,
"filename": "nesting.tokens.json",
"line": 8,
"type": "Text",
@@ -13549,6 +15431,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 8,
@@ -13559,6 +15442,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "nesting.tokens.json",
"isInline": false,
"line": 1,
@@ -13582,28 +15466,38 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "pipeless-comments.tokens.json",
"line": 2,
"type": "Text",
"val": " .foo",
},
Object {
+ "column": 1,
+ "filename": "pipeless-comments.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pipeless-comments.tokens.json",
"line": 3,
"type": "Text",
"val": " .bar",
},
Object {
+ "column": 1,
+ "filename": "pipeless-comments.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pipeless-comments.tokens.json",
"line": 4,
"type": "Text",
"val": ".hey",
@@ -13612,6 +15506,7 @@ Object {
"type": "Block",
},
"buffer": true,
+ "column": 1,
"filename": "pipeless-comments.tokens.json",
"line": 1,
"type": "BlockComment",
@@ -13634,28 +15529,38 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "pipeless-filters.tokens.json",
"line": 2,
"type": "Text",
"val": " code sample",
},
Object {
+ "column": 1,
+ "filename": "pipeless-filters.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pipeless-filters.tokens.json",
"line": 3,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "pipeless-filters.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pipeless-filters.tokens.json",
"line": 4,
"type": "Text",
"val": "# Heading",
@@ -13663,6 +15568,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "pipeless-filters.tokens.json",
"line": 1,
"name": "markdown-it",
@@ -13686,23 +15592,30 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "pipeless-tag.tokens.json",
"line": 2,
"type": "Text",
"val": " what",
},
Object {
+ "column": 1,
+ "filename": "pipeless-tag.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pipeless-tag.tokens.json",
"line": 3,
"type": "Text",
"val": "is ",
},
Object {
"buffer": true,
+ "column": 6,
"filename": "pipeless-tag.tokens.json",
"isInline": true,
"line": 3,
@@ -13711,12 +15624,15 @@ Object {
"val": "\'going\'",
},
Object {
+ "column": 16,
+ "filename": "pipeless-tag.tokens.json",
"line": 3,
"type": "Text",
"val": " ",
},
Object {
"buffer": true,
+ "column": 21,
"filename": "pipeless-tag.tokens.json",
"isInline": true,
"line": 3,
@@ -13725,6 +15641,8 @@ Object {
"val": "\'on\'",
},
Object {
+ "column": 29,
+ "filename": "pipeless-tag.tokens.json",
"line": 3,
"type": "Text",
"val": "",
@@ -13732,6 +15650,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "pipeless-tag.tokens.json",
"isInline": false,
"line": 1,
@@ -13758,39 +15677,53 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "pre.tokens.json",
"line": 2,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "pre.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pre.tokens.json",
"line": 3,
"type": "Text",
"val": "bar",
},
Object {
+ "column": 1,
+ "filename": "pre.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pre.tokens.json",
"line": 4,
"type": "Text",
"val": "baz",
},
Object {
+ "column": 1,
+ "filename": "pre.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "pre.tokens.json",
"line": 5,
"type": "Text",
"val": "",
@@ -13798,6 +15731,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "pre.tokens.json",
"isInline": false,
"line": 1,
@@ -13821,28 +15755,38 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 5,
+ "filename": "pre.tokens.json",
"line": 8,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "pre.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "pre.tokens.json",
"line": 9,
"type": "Text",
"val": "bar",
},
Object {
+ "column": 1,
+ "filename": "pre.tokens.json",
"line": 10,
"type": "Text",
"val": "
",
},
Object {
+ "column": 5,
+ "filename": "pre.tokens.json",
"line": 10,
"type": "Text",
"val": "baz",
@@ -13850,6 +15794,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "pre.tokens.json",
"isInline": true,
"line": 7,
@@ -13861,6 +15806,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "pre.tokens.json",
"isInline": false,
"line": 6,
@@ -13886,6 +15832,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
"filename": "quotes.tokens.json",
"line": 1,
"type": "Text",
@@ -13894,6 +15841,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "quotes.tokens.json",
"isInline": false,
"line": 1,
@@ -13909,6 +15857,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 3,
"filename": "quotes.tokens.json",
"line": 2,
"type": "Text",
@@ -13917,6 +15866,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "quotes.tokens.json",
"isInline": false,
"line": 2,
@@ -13936,6 +15886,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "regression.784.tokens.json",
"isInline": false,
"line": 1,
@@ -13947,6 +15898,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 1,
+ "filename": "regression.784.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "class",
"val": "\'url\'",
@@ -13958,6 +15912,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 6,
"filename": "regression.784.tokens.json",
"isInline": true,
"line": 2,
@@ -13968,6 +15923,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "regression.784.tokens.json",
"isInline": false,
"line": 2,
@@ -13986,7 +15942,9 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"file": Object {
+ "column": 9,
"filename": "regression.1794.tokens.json",
"line": 1,
"path": "./auxiliary/1794-extends.pug",
@@ -13997,6 +15955,7 @@ Object {
"type": "Extends",
},
Object {
+ "column": 1,
"filename": "regression.1794.tokens.json",
"line": 3,
"mode": "replace",
@@ -14009,7 +15968,9 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"file": Object {
+ "column": 11,
"filename": "regression.1794.tokens.json",
"line": 4,
"path": "./auxiliary/1794-include.pug",
@@ -14040,50 +16001,68 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "script.whitespace.tokens.json",
"line": 2,
"type": "Text",
"val": "if (foo) {",
},
Object {
+ "column": 1,
+ "filename": "script.whitespace.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "script.whitespace.tokens.json",
"line": 3,
"type": "Text",
"val": " ",
},
Object {
+ "column": 1,
+ "filename": "script.whitespace.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "script.whitespace.tokens.json",
"line": 4,
"type": "Text",
"val": " bar();",
},
Object {
+ "column": 1,
+ "filename": "script.whitespace.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "script.whitespace.tokens.json",
"line": 5,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "script.whitespace.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "script.whitespace.tokens.json",
"line": 6,
"type": "Text",
"val": "}",
@@ -14091,6 +16070,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "script.whitespace.tokens.json",
"isInline": false,
"line": 1,
@@ -14113,11 +16093,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "scripts.non-js.tokens.json",
+ "line": 1,
"mustEscape": false,
"name": "id",
"val": "\'user-template\'",
},
Object {
+ "column": 22,
+ "filename": "scripts.non-js.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "type",
"val": "\'text/template\'",
@@ -14131,6 +16117,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "scripts.non-js.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "id",
"val": "\'user\'",
@@ -14148,6 +16137,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 8,
"filename": "scripts.non-js.tokens.json",
"line": 3,
"type": "Text",
@@ -14156,6 +16146,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "scripts.non-js.tokens.json",
"isInline": false,
"line": 3,
@@ -14171,6 +16162,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 7,
"filename": "scripts.non-js.tokens.json",
"line": 4,
"type": "Text",
@@ -14179,6 +16171,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "scripts.non-js.tokens.json",
"isInline": false,
"line": 4,
@@ -14189,6 +16182,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "scripts.non-js.tokens.json",
"isInline": false,
"line": 2,
@@ -14199,6 +16193,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.non-js.tokens.json",
"isInline": false,
"line": 1,
@@ -14210,11 +16205,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "scripts.non-js.tokens.json",
+ "line": 6,
"mustEscape": false,
"name": "id",
"val": "\'user-template\'",
},
Object {
+ "column": 22,
+ "filename": "scripts.non-js.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "type",
"val": "\'text/template\'",
@@ -14225,28 +16226,38 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "scripts.non-js.tokens.json",
"line": 7,
"type": "Text",
"val": "if (foo) {",
},
Object {
+ "column": 1,
+ "filename": "scripts.non-js.tokens.json",
"line": 8,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "scripts.non-js.tokens.json",
"line": 8,
"type": "Text",
"val": " bar();",
},
Object {
+ "column": 1,
+ "filename": "scripts.non-js.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "scripts.non-js.tokens.json",
"line": 9,
"type": "Text",
"val": "}",
@@ -14254,6 +16265,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.non-js.tokens.json",
"isInline": false,
"line": 6,
@@ -14280,28 +16292,38 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "scripts.tokens.json",
"line": 2,
"type": "Text",
"val": "if (foo) {",
},
Object {
+ "column": 1,
+ "filename": "scripts.tokens.json",
"line": 3,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "scripts.tokens.json",
"line": 3,
"type": "Text",
"val": " bar();",
},
Object {
+ "column": 1,
+ "filename": "scripts.tokens.json",
"line": 4,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "scripts.tokens.json",
"line": 4,
"type": "Text",
"val": "}",
@@ -14309,6 +16331,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.tokens.json",
"isInline": false,
"line": 1,
@@ -14326,6 +16349,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "scripts.tokens.json",
"isInline": true,
"line": 5,
@@ -14336,6 +16360,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.tokens.json",
"isInline": false,
"line": 5,
@@ -14351,6 +16376,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 8,
"filename": "scripts.tokens.json",
"line": 6,
"type": "Text",
@@ -14359,6 +16385,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.tokens.json",
"isInline": false,
"line": 6,
@@ -14375,6 +16402,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.tokens.json",
"isInline": false,
"line": 7,
@@ -14391,6 +16419,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "scripts.tokens.json",
"isInline": false,
"line": 8,
@@ -14409,6 +16438,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "self-closing-html.tokens.json",
"line": 1,
"type": "Doctype",
@@ -14437,6 +16467,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "self-closing-html.tokens.json",
"isInline": true,
"line": 4,
@@ -14447,6 +16478,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "self-closing-html.tokens.json",
"isInline": false,
"line": 3,
@@ -14457,6 +16489,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "self-closing-html.tokens.json",
"isInline": false,
"line": 2,
@@ -14482,6 +16515,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 6,
"filename": "single-period.tokens.json",
"line": 1,
"type": "Text",
@@ -14490,6 +16524,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "single-period.tokens.json",
"isInline": true,
"line": 1,
@@ -14518,16 +16553,25 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "source.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "preload",
"val": "\'auto\'",
},
Object {
+ "column": 25,
+ "filename": "source.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "autobuffer",
"val": true,
},
Object {
+ "column": 37,
+ "filename": "source.tokens.json",
+ "line": 2,
"mustEscape": false,
"name": "controls",
"val": true,
@@ -14541,6 +16585,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "source.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "src",
"val": "\'foo\'",
@@ -14552,6 +16599,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "source.tokens.json",
"isInline": false,
"line": 3,
@@ -14563,6 +16611,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "source.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'bar\'",
@@ -14574,6 +16625,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "source.tokens.json",
"isInline": false,
"line": 4,
@@ -14584,6 +16636,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "source.tokens.json",
"isInline": false,
"line": 2,
@@ -14594,6 +16647,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "source.tokens.json",
"isInline": false,
"line": 1,
@@ -14633,28 +16687,38 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 7,
+ "filename": "styles.tokens.json",
"line": 4,
"type": "Text",
"val": "body {",
},
Object {
+ "column": 1,
+ "filename": "styles.tokens.json",
"line": 5,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "styles.tokens.json",
"line": 5,
"type": "Text",
"val": " padding: 50px;",
},
Object {
+ "column": 1,
+ "filename": "styles.tokens.json",
"line": 6,
"type": "Text",
"val": "
",
},
Object {
+ "column": 7,
+ "filename": "styles.tokens.json",
"line": 6,
"type": "Text",
"val": "}",
@@ -14662,6 +16726,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 3,
@@ -14673,6 +16738,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "styles.tokens.json",
"isInline": false,
"line": 2,
@@ -14691,6 +16757,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "styles.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "style",
"val": "\'color:red;background:green\'",
@@ -14702,6 +16771,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 8,
@@ -14713,6 +16783,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "styles.tokens.json",
+ "line": 9,
"mustEscape": true,
"name": "style",
"val": "{color: \'red\', background: \'green\'}",
@@ -14724,6 +16797,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 9,
@@ -14733,7 +16807,13 @@ Object {
},
Object {
"attributeBlocks": Array [
- "{style: \'color:red;background:green\'}",
+ Object {
+ "column": 8,
+ "filename": "styles.tokens.json",
+ "line": 10,
+ "type": "AttributeBlock",
+ "val": "{style: \'color:red;background:green\'}",
+ },
],
"attrs": Array [],
"block": Object {
@@ -14742,6 +16822,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 10,
@@ -14751,7 +16832,13 @@ Object {
},
Object {
"attributeBlocks": Array [
- "{style: {color: \'red\', background: \'green\'}}",
+ Object {
+ "column": 8,
+ "filename": "styles.tokens.json",
+ "line": 11,
+ "type": "AttributeBlock",
+ "val": "{style: {color: \'red\', background: \'green\'}}",
+ },
],
"attrs": Array [],
"block": Object {
@@ -14760,6 +16847,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 11,
@@ -14775,7 +16863,13 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 10,
+ "filename": "styles.tokens.json",
+ "line": 13,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [],
"block": Object {
@@ -14784,6 +16878,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "styles.tokens.json",
"isInline": false,
"line": 13,
@@ -14795,6 +16890,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 5,
"filename": "styles.tokens.json",
"line": 12,
"name": "div",
@@ -14805,6 +16901,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "styles.tokens.json",
+ "line": 14,
"mustEscape": true,
"name": "style",
"val": "\'color:red;background:green\'",
@@ -14812,6 +16911,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 5,
"filename": "styles.tokens.json",
"line": 14,
"name": "div",
@@ -14822,6 +16922,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "styles.tokens.json",
+ "line": 15,
"mustEscape": true,
"name": "style",
"val": "{color: \'red\', background: \'green\'}",
@@ -14829,6 +16932,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 5,
"filename": "styles.tokens.json",
"line": 15,
"name": "div",
@@ -14836,6 +16940,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 16,
@@ -14847,6 +16952,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "styles.tokens.json",
+ "line": 17,
"mustEscape": true,
"name": "style",
"val": "{color: \'red\', background: bg}",
@@ -14858,6 +16966,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 17,
@@ -14867,7 +16976,13 @@ Object {
},
Object {
"attributeBlocks": Array [
- "{style: {color: \'red\', background: bg}}",
+ Object {
+ "column": 8,
+ "filename": "styles.tokens.json",
+ "line": 18,
+ "type": "AttributeBlock",
+ "val": "{style: {color: \'red\', background: bg}}",
+ },
],
"attrs": Array [],
"block": Object {
@@ -14876,6 +16991,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "styles.tokens.json",
"isInline": false,
"line": 18,
@@ -14888,6 +17004,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "styles.tokens.json",
+ "line": 19,
"mustEscape": true,
"name": "style",
"val": "{color: \'red\', background: bg}",
@@ -14895,6 +17014,7 @@ Object {
],
"block": null,
"call": true,
+ "column": 5,
"filename": "styles.tokens.json",
"line": 19,
"name": "div",
@@ -14903,6 +17023,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "styles.tokens.json",
"isInline": false,
"line": 7,
@@ -14913,6 +17034,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "styles.tokens.json",
"isInline": false,
"line": 1,
@@ -14932,6 +17054,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "tag.interpolation.tokens.json",
"isInline": false,
"line": 2,
@@ -14941,6 +17064,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "tag.interpolation.tokens.json",
"isInline": false,
"line": 3,
@@ -14956,6 +17080,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 8,
"filename": "tag.interpolation.tokens.json",
"line": 5,
"type": "Text",
@@ -14964,6 +17089,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"expr": "tag",
"filename": "tag.interpolation.tokens.json",
"isInline": false,
@@ -14975,6 +17101,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "foo",
"val": "\'bar\'",
@@ -14985,6 +17114,7 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 19,
"filename": "tag.interpolation.tokens.json",
"line": 6,
"type": "Text",
@@ -14993,6 +17123,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"expr": "tag",
"filename": "tag.interpolation.tokens.json",
"isInline": false,
@@ -15004,6 +17135,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 21,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 7,
"mustEscape": true,
"name": "something",
"val": true,
@@ -15014,6 +17148,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 32,
"filename": "tag.interpolation.tokens.json",
"line": 7,
"type": "Text",
@@ -15022,6 +17157,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"expr": "foo ? \'a\' : \'li\'",
"filename": "tag.interpolation.tokens.json",
"isInline": false,
@@ -15049,7 +17185,13 @@ Object {
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 11,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 16,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [],
"block": Object {
@@ -15060,11 +17202,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 17,
"mustEscape": false,
"name": "class",
"val": "\'icon\'",
},
Object {
+ "column": 18,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 17,
"mustEscape": true,
"name": "src",
"val": "icon",
@@ -15076,6 +17224,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 9,
"filename": "tag.interpolation.tokens.json",
"isInline": true,
"line": 17,
@@ -15084,6 +17233,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 9,
"filename": "tag.interpolation.tokens.json",
"line": 18,
"type": "MixinBlock",
@@ -15091,6 +17241,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "tag.interpolation.tokens.json",
"isInline": true,
"line": 16,
@@ -15101,13 +17252,20 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"consequent": Object {
"filename": "tag.interpolation.tokens.json",
"line": 12,
"nodes": Array [
Object {
"attributeBlocks": Array [
- "attributes",
+ Object {
+ "column": 8,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 12,
+ "type": "AttributeBlock",
+ "val": "attributes",
+ },
],
"attrs": Array [],
"block": Object {
@@ -15118,11 +17276,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 13,
"mustEscape": false,
"name": "class",
"val": "\'icon\'",
},
Object {
+ "column": 18,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 13,
"mustEscape": true,
"name": "src",
"val": "icon",
@@ -15134,6 +17298,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 9,
"filename": "tag.interpolation.tokens.json",
"isInline": true,
"line": 13,
@@ -15142,6 +17307,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 9,
"filename": "tag.interpolation.tokens.json",
"line": 14,
"type": "MixinBlock",
@@ -15149,6 +17315,7 @@ Object {
],
"type": "Block",
},
+ "column": 7,
"filename": "tag.interpolation.tokens.json",
"isInline": true,
"line": 12,
@@ -15167,6 +17334,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "tag.interpolation.tokens.json",
"isInline": false,
"line": 10,
@@ -15178,6 +17346,7 @@ Object {
"type": "Block",
},
"call": false,
+ "column": 1,
"filename": "tag.interpolation.tokens.json",
"line": 9,
"name": "item",
@@ -15199,6 +17368,7 @@ Object {
"line": 21,
"nodes": Array [
Object {
+ "column": 20,
"filename": "tag.interpolation.tokens.json",
"line": 21,
"type": "Text",
@@ -15208,6 +17378,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "tag.interpolation.tokens.json",
"line": 21,
"name": "item",
@@ -15218,6 +17389,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "tag.interpolation.tokens.json",
+ "line": 22,
"mustEscape": true,
"name": "href",
"val": "\'/contact\'",
@@ -15228,6 +17402,7 @@ Object {
"line": 22,
"nodes": Array [
Object {
+ "column": 26,
"filename": "tag.interpolation.tokens.json",
"line": 22,
"type": "Text",
@@ -15237,6 +17412,7 @@ Object {
"type": "Block",
},
"call": true,
+ "column": 3,
"filename": "tag.interpolation.tokens.json",
"line": 22,
"name": "item",
@@ -15245,6 +17421,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "tag.interpolation.tokens.json",
"isInline": false,
"line": 20,
@@ -15264,6 +17441,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 1,
"filename": "tag-blocks.tokens.json",
"line": 1,
"type": "Comment",
@@ -15277,6 +17455,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"filename": "tag-blocks.tokens.json",
"line": 3,
"type": "Text",
@@ -15291,6 +17470,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 39,
"filename": "tag-blocks.tokens.json",
"isInline": true,
"line": 3,
@@ -15301,6 +17481,7 @@ Object {
],
"type": "Block",
},
+ "column": 33,
"filename": "tag-blocks.tokens.json",
"isInline": true,
"line": 3,
@@ -15309,6 +17490,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 58,
"filename": "tag-blocks.tokens.json",
"line": 3,
"type": "Text",
@@ -15316,6 +17498,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 3,
"filename": "tag-blocks.tokens.json",
"isInline": false,
"line": 4,
@@ -15324,6 +17507,7 @@ Object {
"val": "\' \'",
},
Object {
+ "column": 5,
"filename": "tag-blocks.tokens.json",
"line": 5,
"type": "Text",
@@ -15332,6 +17516,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "tag-blocks.tokens.json",
"isInline": false,
"line": 2,
@@ -15365,6 +17550,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 3,
@@ -15376,6 +17562,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "tags.self-closing.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "bar",
"val": "\'baz\'",
@@ -15387,6 +17576,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 4,
@@ -15403,6 +17593,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 5,
@@ -15414,6 +17605,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "tags.self-closing.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "bar",
"val": "\'baz\'",
@@ -15425,6 +17619,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 6,
@@ -15440,6 +17635,7 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 7,
"filename": "tags.self-closing.tokens.json",
"line": 7,
"type": "Text",
@@ -15448,6 +17644,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 7,
@@ -15459,6 +17656,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 7,
+ "filename": "tags.self-closing.tokens.json",
+ "line": 8,
"mustEscape": true,
"name": "bar",
"val": "\'baz\'",
@@ -15469,6 +17669,7 @@ Object {
"line": 8,
"nodes": Array [
Object {
+ "column": 18,
"filename": "tags.self-closing.tokens.json",
"line": 8,
"type": "Text",
@@ -15477,6 +17678,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 8,
@@ -15493,6 +17695,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"expr": "\'foo\'",
"filename": "tags.self-closing.tokens.json",
"isInline": false,
@@ -15504,6 +17707,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "tags.self-closing.tokens.json",
+ "line": 10,
"mustEscape": true,
"name": "bar",
"val": "\'baz\'",
@@ -15515,6 +17721,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"expr": "\'foo\'",
"filename": "tags.self-closing.tokens.json",
"isInline": false,
@@ -15530,6 +17737,7 @@ Object {
"line": 11,
"nodes": Array [
Object {
+ "column": 12,
"filename": "tags.self-closing.tokens.json",
"line": 11,
"type": "Text",
@@ -15538,6 +17746,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"expr": "\'foo\'",
"filename": "tags.self-closing.tokens.json",
"isInline": false,
@@ -15549,6 +17758,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "tags.self-closing.tokens.json",
+ "line": 12,
"mustEscape": true,
"name": "bar",
"val": "\'baz\'",
@@ -15559,6 +17771,7 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 23,
"filename": "tags.self-closing.tokens.json",
"line": 12,
"type": "Text",
@@ -15567,6 +17780,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"expr": "\'foo\'",
"filename": "tags.self-closing.tokens.json",
"isInline": false,
@@ -15576,6 +17790,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"line": 13,
"type": "Comment",
@@ -15589,6 +17804,7 @@ Object {
"line": 14,
"nodes": Array [
Object {
+ "column": 6,
"filename": "tags.self-closing.tokens.json",
"line": 14,
"type": "Text",
@@ -15597,6 +17813,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": true,
"line": 14,
@@ -15606,6 +17823,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"line": 15,
"type": "Comment",
@@ -15619,6 +17837,7 @@ Object {
"line": 16,
"nodes": Array [
Object {
+ "column": 7,
"filename": "tags.self-closing.tokens.json",
"line": 16,
"type": "Text",
@@ -15627,6 +17846,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "tags.self-closing.tokens.json",
"isInline": true,
"line": 16,
@@ -15643,6 +17863,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"expr": "
\'foo\'
",
@@ -15655,6 +17876,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "tags.self-closing.tokens.json",
"isInline": false,
"line": 2,
@@ -15676,6 +17898,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "template.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "type",
"val": "\'text/x-template\'",
@@ -15700,6 +17925,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 8,
"filename": "template.tokens.json",
"line": 3,
"type": "Text",
@@ -15708,6 +17934,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "template.tokens.json",
"isInline": false,
"line": 3,
@@ -15723,6 +17950,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 7,
"filename": "template.tokens.json",
"line": 4,
"type": "Text",
@@ -15731,6 +17959,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "template.tokens.json",
"isInline": false,
"line": 4,
@@ -15741,6 +17970,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "template.tokens.json",
"isInline": false,
"line": 2,
@@ -15751,6 +17981,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "template.tokens.json",
"isInline": false,
"line": 1,
@@ -15762,6 +17993,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "template.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "type",
"val": "\'text/x-template\'",
@@ -15772,28 +18006,38 @@ Object {
"line": 6,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "template.tokens.json",
"line": 7,
"type": "Text",
"val": "article",
},
Object {
+ "column": 1,
+ "filename": "template.tokens.json",
"line": 8,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "template.tokens.json",
"line": 8,
"type": "Text",
"val": " h2 {{title}}",
},
Object {
+ "column": 1,
+ "filename": "template.tokens.json",
"line": 9,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "template.tokens.json",
"line": 9,
"type": "Text",
"val": " p {{description}}",
@@ -15801,6 +18045,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "template.tokens.json",
"isInline": false,
"line": 6,
@@ -15823,6 +18068,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 8,
+ "filename": "text.tokens.json",
+ "line": 1,
"mustEscape": true,
"name": "value",
"val": "\'\'",
@@ -15833,6 +18081,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 18,
"filename": "text.tokens.json",
"line": 1,
"type": "Text",
@@ -15841,6 +18090,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 1,
@@ -15857,6 +18107,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 3,
@@ -15873,6 +18124,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 5,
@@ -15889,12 +18141,14 @@ Object {
"line": 7,
"nodes": Array [
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 8,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 9,
"type": "Text",
@@ -15902,12 +18156,14 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 9,
"type": "Text",
"val": "bar",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 10,
"type": "Text",
@@ -15915,6 +18171,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 10,
"type": "Text",
@@ -15923,6 +18180,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 7,
@@ -15938,61 +18196,83 @@ Object {
"line": 12,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 13,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 14,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 14,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 15,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 15,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 16,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 16,
"type": "Text",
"val": "bar",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 17,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 17,
"type": "Text",
"val": "baz",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 18,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 18,
"type": "Text",
"val": "",
@@ -16000,6 +18280,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 12,
@@ -16009,61 +18290,83 @@ Object {
"type": "Tag",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 22,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 23,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 23,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 24,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 24,
"type": "Text",
"val": "",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 25,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 25,
"type": "Text",
"val": "bar",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 26,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 26,
"type": "Text",
"val": "baz",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 27,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 27,
"type": "Text",
"val": "",
@@ -16076,12 +18379,14 @@ Object {
"line": 28,
"nodes": Array [
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 29,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 30,
"type": "Text",
@@ -16089,12 +18394,14 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 30,
"type": "Text",
"val": " bar",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 31,
"type": "Text",
@@ -16102,12 +18409,14 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 31,
"type": "Text",
"val": " baz",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 32,
"type": "Text",
@@ -16115,6 +18424,7 @@ Object {
",
},
Object {
+ "column": 5,
"filename": "text.tokens.json",
"line": 32,
"type": "Text",
@@ -16123,6 +18433,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 28,
@@ -16138,50 +18449,68 @@ Object {
"line": 34,
"nodes": Array [
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 35,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 36,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 36,
"type": "Text",
"val": " bar",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 37,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 37,
"type": "Text",
"val": " baz",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 38,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 38,
"type": "Text",
"val": ".",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 39,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 39,
"type": "Text",
"val": "",
@@ -16189,6 +18518,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text.tokens.json",
"isInline": false,
"line": 34,
@@ -16198,39 +18528,53 @@ Object {
"type": "Tag",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 41,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 42,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 42,
"type": "Text",
"val": " bar",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 43,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 43,
"type": "Text",
"val": " baz",
},
Object {
+ "column": 1,
+ "filename": "text.tokens.json",
"line": 44,
"type": "Text",
"val": "
",
},
Object {
+ "column": 3,
+ "filename": "text.tokens.json",
"line": 44,
"type": "Text",
"val": ".",
@@ -16275,6 +18619,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 7,
"filename": "text-block.tokens.json",
"line": 2,
"type": "Text",
@@ -16284,11 +18629,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "text-block.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "type",
"val": "\'text\'",
},
Object {
+ "column": 22,
+ "filename": "text-block.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "name",
"val": "\'user[name]\'",
@@ -16300,6 +18651,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "text-block.tokens.json",
"isInline": false,
"line": 3,
@@ -16310,6 +18662,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text-block.tokens.json",
"isInline": false,
"line": 2,
@@ -16325,6 +18678,7 @@ Object {
"line": 5,
"nodes": Array [
Object {
+ "column": 7,
"filename": "text-block.tokens.json",
"line": 5,
"type": "Text",
@@ -16334,11 +18688,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 9,
+ "filename": "text-block.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "type",
"val": "\'text\'",
},
Object {
+ "column": 22,
+ "filename": "text-block.tokens.json",
+ "line": 6,
"mustEscape": true,
"name": "name",
"val": "\'user[pass]\'",
@@ -16350,6 +18710,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "text-block.tokens.json",
"isInline": false,
"line": 6,
@@ -16360,6 +18721,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "text-block.tokens.json",
"isInline": false,
"line": 5,
@@ -16385,6 +18747,7 @@ Object {
"line": 1,
"nodes": Array [
Object {
+ "column": 3,
"filename": "utf8bom.tokens.json",
"line": 1,
"type": "Text",
@@ -16393,6 +18756,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "utf8bom.tokens.json",
"isInline": false,
"line": 1,
@@ -16412,6 +18776,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "vars.tokens.json",
"isInline": false,
"line": 1,
@@ -16421,6 +18786,7 @@ Object {
},
Object {
"buffer": false,
+ "column": 1,
"filename": "vars.tokens.json",
"isInline": false,
"line": 2,
@@ -16432,11 +18798,17 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 3,
+ "filename": "vars.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "class",
"val": "list",
},
Object {
+ "column": 15,
+ "filename": "vars.tokens.json",
+ "line": 3,
"mustEscape": true,
"name": "id",
"val": "foo",
@@ -16448,6 +18820,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "vars.tokens.json",
"isInline": true,
"line": 3,
@@ -16467,6 +18840,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 1,
"filename": "while.tokens.json",
"isInline": false,
"line": 1,
@@ -16488,6 +18862,7 @@ Object {
"nodes": Array [
Object {
"buffer": false,
+ "column": 5,
"filename": "while.tokens.json",
"isInline": false,
"line": 4,
@@ -16504,6 +18879,7 @@ Object {
"nodes": Array [
Object {
"buffer": true,
+ "column": 7,
"filename": "while.tokens.json",
"isInline": true,
"line": 5,
@@ -16514,6 +18890,7 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"filename": "while.tokens.json",
"isInline": false,
"line": 5,
@@ -16524,6 +18901,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "while.tokens.json",
"line": 3,
"test": "x < 10",
@@ -16532,6 +18910,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "while.tokens.json",
"isInline": false,
"line": 2,
@@ -16550,6 +18929,7 @@ Object {
"line": 0,
"nodes": Array [
Object {
+ "column": 1,
"filename": "xml.tokens.json",
"line": 1,
"type": "Doctype",
@@ -16559,6 +18939,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "xml.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "term",
"val": "\'some term\'",
@@ -16570,6 +18953,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 1,
"filename": "xml.tokens.json",
"isInline": false,
"line": 2,
@@ -16585,6 +18969,7 @@ Object {
"line": 3,
"nodes": Array [
Object {
+ "column": 6,
"filename": "xml.tokens.json",
"line": 3,
"type": "Text",
@@ -16593,6 +18978,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "xml.tokens.json",
"isInline": false,
"line": 3,
@@ -16633,6 +19019,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "yield.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'/caustic.js\'",
@@ -16644,6 +19033,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "yield.tokens.json",
"isInline": false,
"line": 4,
@@ -16655,6 +19045,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "yield.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'/app.js\'",
@@ -16666,6 +19059,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "yield.tokens.json",
"isInline": false,
"line": 5,
@@ -16676,7 +19070,9 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"file": Object {
+ "column": 13,
"filename": "yield.tokens.json",
"line": 3,
"path": "yield-head.pug",
@@ -16689,6 +19085,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "yield.tokens.json",
"isInline": false,
"line": 2,
@@ -16699,6 +19096,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield.tokens.json",
"isInline": false,
"line": 1,
@@ -16739,6 +19137,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "yield-before-conditional.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'/caustic.js\'",
@@ -16750,6 +19151,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "yield-before-conditional.tokens.json",
"isInline": false,
"line": 4,
@@ -16761,6 +19163,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 14,
+ "filename": "yield-before-conditional.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'/app.js\'",
@@ -16772,6 +19177,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 7,
"filename": "yield-before-conditional.tokens.json",
"isInline": false,
"line": 5,
@@ -16782,7 +19188,9 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"file": Object {
+ "column": 13,
"filename": "yield-before-conditional.tokens.json",
"line": 3,
"path": "yield-before-conditional-head.pug",
@@ -16795,6 +19203,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "yield-before-conditional.tokens.json",
"isInline": false,
"line": 2,
@@ -16805,6 +19214,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield-before-conditional.tokens.json",
"isInline": false,
"line": 1,
@@ -16833,6 +19243,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "yield-before-conditional-head.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.js\'",
@@ -16844,6 +19257,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "yield-before-conditional-head.tokens.json",
"isInline": false,
"line": 2,
@@ -16852,12 +19266,14 @@ Object {
"type": "Tag",
},
Object {
+ "column": 3,
"filename": "yield-before-conditional-head.tokens.json",
"line": 3,
"type": "YieldBlock",
},
Object {
"alternate": null,
+ "column": 3,
"consequent": Object {
"filename": "yield-before-conditional-head.tokens.json",
"line": 5,
@@ -16866,6 +19282,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 12,
+ "filename": "yield-before-conditional-head.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.ui.js\'",
@@ -16877,6 +19296,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 5,
"filename": "yield-before-conditional-head.tokens.json",
"isInline": false,
"line": 5,
@@ -16895,6 +19315,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield-before-conditional-head.tokens.json",
"isInline": false,
"line": 1,
@@ -16923,6 +19344,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "yield-head.tokens.json",
+ "line": 2,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.js\'",
@@ -16934,6 +19358,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "yield-head.tokens.json",
"isInline": false,
"line": 2,
@@ -16942,6 +19367,7 @@ Object {
"type": "Tag",
},
Object {
+ "column": 3,
"filename": "yield-head.tokens.json",
"line": 3,
"type": "YieldBlock",
@@ -16950,6 +19376,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "yield-head.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.ui.js\'",
@@ -16961,6 +19390,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "yield-head.tokens.json",
"isInline": false,
"line": 4,
@@ -16971,6 +19401,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield-head.tokens.json",
"isInline": false,
"line": 1,
@@ -17008,6 +19439,7 @@ Object {
"line": 4,
"nodes": Array [
Object {
+ "column": 9,
"filename": "yield-title.tokens.json",
"line": 4,
"type": "Text",
@@ -17016,7 +19448,9 @@ Object {
],
"type": "Block",
},
+ "column": 5,
"file": Object {
+ "column": 13,
"filename": "yield-title.tokens.json",
"line": 3,
"path": "yield-title-head.pug",
@@ -17029,6 +19463,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "yield-title.tokens.json",
"isInline": false,
"line": 2,
@@ -17039,6 +19474,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield-title.tokens.json",
"isInline": false,
"line": 1,
@@ -17071,6 +19507,7 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"filename": "yield-title-head.tokens.json",
"line": 3,
"type": "YieldBlock",
@@ -17078,6 +19515,7 @@ Object {
],
"type": "Block",
},
+ "column": 3,
"filename": "yield-title-head.tokens.json",
"isInline": false,
"line": 2,
@@ -17089,6 +19527,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "yield-title-head.tokens.json",
+ "line": 4,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.js\'",
@@ -17100,6 +19541,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "yield-title-head.tokens.json",
"isInline": false,
"line": 4,
@@ -17111,6 +19553,9 @@ Object {
"attributeBlocks": Array [],
"attrs": Array [
Object {
+ "column": 10,
+ "filename": "yield-title-head.tokens.json",
+ "line": 5,
"mustEscape": true,
"name": "src",
"val": "\'/jquery.ui.js\'",
@@ -17122,6 +19567,7 @@ Object {
"nodes": Array [],
"type": "Block",
},
+ "column": 3,
"filename": "yield-title-head.tokens.json",
"isInline": false,
"line": 5,
@@ -17132,6 +19578,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"filename": "yield-title-head.tokens.json",
"isInline": false,
"line": 1,
diff --git a/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap b/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
index 0d1576139..7dd657623 100644
--- a/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/no-unnecessary-blocks.test.js.snap
@@ -9,16 +9,20 @@ Object {
"line": 2,
"nodes": Array [
Object {
+ "column": 5,
"line": 3,
"type": "Text",
"val": "Hello",
},
Object {
+ "column": 1,
"line": 4,
"type": "Text",
- "val": "\n",
+ "val": "
+",
},
Object {
+ "column": 5,
"line": 4,
"type": "Text",
"val": "World",
@@ -26,6 +30,7 @@ Object {
],
"type": "Block",
},
+ "column": 1,
"isInline": false,
"line": 2,
"name": "div",
diff --git a/packages/pug-parser/try.js b/packages/pug-parser/try.js
new file mode 100644
index 000000000..51593e751
--- /dev/null
+++ b/packages/pug-parser/try.js
@@ -0,0 +1,29 @@
+var lex = require('../pug-lexer');
+var parse = require('./');
+
+var filename = 'my-file.pug';
+var src = `
+-
+
+ import { Block } from 'dwayne';
+ import { Block } from 'dwayne';
+
+div(data-foo="bar", k=a.c)
+ a&attributes(attrs)
+ :cdata
+ 123
+`;
+var src = `
+script
+ :cdata:uglify-js
+ function myFunc(foo) {
+ return foo;
+ }
+ `;
+var tokens = lex(src, {filename});
+
+console.log(tokens);
+
+var ast = parse(tokens, {filename, src});
+
+console.log(JSON.stringify(ast, null, ' '));
diff --git a/packages/pug-walk/test/index.test.js b/packages/pug-walk/test/index.test.js
index 0bbf15b75..7881da99e 100644
--- a/packages/pug-walk/test/index.test.js
+++ b/packages/pug-walk/test/index.test.js
@@ -11,7 +11,12 @@ test('simple', function () {
// to replace the node, call `replace(newNode)`
// return `false` to skip descending
if (node.type === 'Text') {
- replace({ type: 'Text', val: 'bar', line: node.line });
+ replace({
+ type: 'Text',
+ val: 'bar',
+ line: node.line,
+ column: node.column
+ });
}
}, function after(node, replace) {
// called before walking the children of `node`
@@ -114,18 +119,22 @@ describe('replace([])', function () {
if (node.type === 'IncludeFilter') {
assert(replace.arrayAllowed);
if (node.name === 'filter1') {
+ var firstFilter = 'filter3';
+
replace([
{
type: 'IncludeFilter',
- name: 'filter3',
+ name: firstFilter,
attrs: [],
- line: node.line
+ line: node.line,
+ column: node.column
},
{
type: 'IncludeFilter',
name: 'filter4',
attrs: [],
- line: node.line
+ line: node.line,
+ column: node.column + firstFilter.length + 1
}
]);
} else if (node.name === 'filter2') {
From 17c11aeed0454c421b3a0b20f3cd6b87ac6665c8 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Wed, 6 Sep 2017 16:26:57 +0100
Subject: [PATCH 24/96] Update test case
---
packages/pug-parser/test/__snapshots__/index.test.js.snap | 3 +++
1 file changed, 3 insertions(+)
diff --git a/packages/pug-parser/test/__snapshots__/index.test.js.snap b/packages/pug-parser/test/__snapshots__/index.test.js.snap
index 4fb3c80eb..10738aba3 100644
--- a/packages/pug-parser/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/index.test.js.snap
@@ -18580,12 +18580,14 @@ Object {
"val": ".",
},
Object {
+ "column": 3,
"filename": "text.tokens.json",
"line": 45,
"type": "Text",
"val": "foo",
},
Object {
+ "column": 1,
"filename": "text.tokens.json",
"line": 46,
"type": "Text",
@@ -18594,6 +18596,7 @@ Object {
},
Object {
"buffer": true,
+ "column": 3,
"filename": "text.tokens.json",
"isInline": true,
"line": 46,
From 39988d583152c8b436465c19b92d9c6562bacab4 Mon Sep 17 00:00:00 2001
From: Forbes Lindesay
Date: Wed, 6 Sep 2017 16:28:02 +0100
Subject: [PATCH 25/96] Publish
- pug-code-gen@2.0.0
- pug-filters@2.1.5
- pug-linker@3.0.3
- pug-load@2.0.9
- pug-parser@4.0.0
- pug-walk@1.1.5
- pug@2.0.0-rc.4
---
packages/pug-code-gen/package.json | 2 +-
packages/pug-filters/package.json | 8 ++++----
packages/pug-linker/package.json | 8 ++++----
packages/pug-load/package.json | 6 +++---
packages/pug-parser/package.json | 2 +-
packages/pug-walk/package.json | 4 ++--
packages/pug/package.json | 12 ++++++------
7 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/packages/pug-code-gen/package.json b/packages/pug-code-gen/package.json
index 9fe253233..5aefc9621 100644
--- a/packages/pug-code-gen/package.json
+++ b/packages/pug-code-gen/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-code-gen",
- "version": "1.1.1",
+ "version": "2.0.0",
"description": "Default code-generator for pug. It generates HTML via a JavaScript template function.",
"keywords": [
"pug"
diff --git a/packages/pug-filters/package.json b/packages/pug-filters/package.json
index 7163e4eaa..f870784f1 100644
--- a/packages/pug-filters/package.json
+++ b/packages/pug-filters/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-filters",
- "version": "2.1.4",
+ "version": "2.1.5",
"description": "Code for processing filters in pug templates",
"keywords": [
"pug"
@@ -9,7 +9,7 @@
"clean-css": "^3.3.0",
"constantinople": "^3.0.1",
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.4",
+ "pug-walk": "^1.1.5",
"jstransformer": "1.0.0",
"resolve": "^1.1.6",
"uglify-js": "^2.6.1"
@@ -23,8 +23,8 @@
"jstransformer-stylus": "^1.0.0",
"jstransformer-uglify-js": "^1.1.1",
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.8",
- "pug-parser": "^3.0.1"
+ "pug-load": "^2.0.9",
+ "pug-parser": "^4.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-linker/package.json b/packages/pug-linker/package.json
index 6a4a7df8c..f3f47133d 100644
--- a/packages/pug-linker/package.json
+++ b/packages/pug-linker/package.json
@@ -1,18 +1,18 @@
{
"name": "pug-linker",
- "version": "3.0.2",
+ "version": "3.0.3",
"description": "Link multiple pug ASTs together using include/extends",
"keywords": [
"pug"
],
"dependencies": {
"pug-error": "^1.3.2",
- "pug-walk": "^1.1.4"
+ "pug-walk": "^1.1.5"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-load": "^2.0.8",
- "pug-parser": "^3.0.1"
+ "pug-load": "^2.0.9",
+ "pug-parser": "^4.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-load/package.json b/packages/pug-load/package.json
index c0e7e3c31..ab74d9220 100644
--- a/packages/pug-load/package.json
+++ b/packages/pug-load/package.json
@@ -1,17 +1,17 @@
{
"name": "pug-load",
- "version": "2.0.8",
+ "version": "2.0.9",
"description": "The Pug loader is responsible for loading the depenendencies of a given Pug file.",
"keywords": [
"pug"
],
"dependencies": {
"object-assign": "^4.1.0",
- "pug-walk": "^1.1.4"
+ "pug-walk": "^1.1.5"
},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^3.0.1"
+ "pug-parser": "^4.0.0"
},
"repository": {
"type": "git",
diff --git a/packages/pug-parser/package.json b/packages/pug-parser/package.json
index a70d04178..e72b0245f 100644
--- a/packages/pug-parser/package.json
+++ b/packages/pug-parser/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-parser",
- "version": "3.0.1",
+ "version": "4.0.0",
"description": "The pug parser (takes an array of tokens and converts it to an abstract syntax tree)",
"keywords": [
"pug"
diff --git a/packages/pug-walk/package.json b/packages/pug-walk/package.json
index 5bfe16ee8..c0fa60070 100644
--- a/packages/pug-walk/package.json
+++ b/packages/pug-walk/package.json
@@ -1,6 +1,6 @@
{
"name": "pug-walk",
- "version": "1.1.4",
+ "version": "1.1.5",
"description": "Walk and transform a pug AST",
"keywords": [
"pug"
@@ -8,7 +8,7 @@
"dependencies": {},
"devDependencies": {
"pug-lexer": "^3.1.0",
- "pug-parser": "^3.0.1"
+ "pug-parser": "^4.0.0"
},
"files": [
"index.js"
diff --git a/packages/pug/package.json b/packages/pug/package.json
index 4fcc931bc..51f5c1f95 100644
--- a/packages/pug/package.json
+++ b/packages/pug/package.json
@@ -1,7 +1,7 @@
{
"name": "pug",
"description": "A clean, whitespace-sensitive template language for writing HTML",
- "version": "2.0.0-rc.3",
+ "version": "2.0.0-rc.4",
"author": "TJ Holowaychuk ",
"maintainers": [
"Forbes Lindesay ",
@@ -20,12 +20,12 @@
},
"main": "lib",
"dependencies": {
- "pug-code-gen": "^1.1.1",
- "pug-filters": "^2.1.4",
+ "pug-code-gen": "^2.0.0",
+ "pug-filters": "^2.1.5",
"pug-lexer": "^3.1.0",
- "pug-linker": "^3.0.2",
- "pug-load": "^2.0.8",
- "pug-parser": "^3.0.1",
+ "pug-linker": "^3.0.3",
+ "pug-load": "^2.0.9",
+ "pug-parser": "^4.0.0",
"pug-runtime": "^2.0.3",
"pug-strip-comments": "^1.0.2"
},
From 8b78976a73cb3e470a36a31791ea24b893afbfc2 Mon Sep 17 00:00:00 2001
From: Nicholas Lee
Date: Mon, 11 Sep 2017 01:59:36 +0900
Subject: [PATCH 26/96] remove unnecessary words (#2865)
---
packages/pug-parser/README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/packages/pug-parser/README.md b/packages/pug-parser/README.md
index 628e6dbd4..cfb4c0d04 100644
--- a/packages/pug-parser/README.md
+++ b/packages/pug-parser/README.md
@@ -87,4 +87,3 @@ Constructor for a Parser class. This is not meant to be used directly unless you
## License
MIT
- kkk
From dd4962320f2575a8aa42d2adb65c295fc5915432 Mon Sep 17 00:00:00 2001
From: Dmitri Beltjukov
Date: Sun, 10 Sep 2017 20:06:15 +0300
Subject: [PATCH 27/96] Replace const with var for 'use strict' in older node
(#2815)
From 9cb96de9f32957ef2fc49a7cc2ba26f40becb2a4 Mon Sep 17 00:00:00 2001
From: droooney
Date: Mon, 25 Sep 2017 19:13:53 +0500
Subject: [PATCH 28/96] fixes #2866 (#2867)
---
packages/pug-code-gen/index.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/pug-code-gen/index.js b/packages/pug-code-gen/index.js
index 9f578ef79..6409d0ad0 100644
--- a/packages/pug-code-gen/index.js
+++ b/packages/pug-code-gen/index.js
@@ -810,7 +810,7 @@ Compiler.prototype = {
* Compile attribute blocks.
*/
- attributeBlocks(attributeBlocks) {
+ attributeBlocks: function (attributeBlocks) {
return attributeBlocks && attributeBlocks.slice().map(function(attrBlock){
return attrBlock.val;
});
From 201941a7daa81f74e108f48f13b47d2af0d5c1b3 Mon Sep 17 00:00:00 2001
From: droooney
Date: Mon, 25 Sep 2017 19:14:25 +0500
Subject: [PATCH 29/96] fixes #2863 (#2864)
---
packages/pug-parser/try.js | 29 -----------------------------
1 file changed, 29 deletions(-)
delete mode 100644 packages/pug-parser/try.js
diff --git a/packages/pug-parser/try.js b/packages/pug-parser/try.js
deleted file mode 100644
index 51593e751..000000000
--- a/packages/pug-parser/try.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var lex = require('../pug-lexer');
-var parse = require('./');
-
-var filename = 'my-file.pug';
-var src = `
--
-
- import { Block } from 'dwayne';
- import { Block } from 'dwayne';
-
-div(data-foo="bar", k=a.c)
- a&attributes(attrs)
- :cdata
- 123
-`;
-var src = `
-script
- :cdata:uglify-js
- function myFunc(foo) {
- return foo;
- }
- `;
-var tokens = lex(src, {filename});
-
-console.log(tokens);
-
-var ast = parse(tokens, {filename, src});
-
-console.log(JSON.stringify(ast, null, ' '));
From cb56c83850003457f36c093172a837a4ca16b230 Mon Sep 17 00:00:00 2001
From: Alexis Tyler
Date: Mon, 16 Oct 2017 23:42:29 +1030
Subject: [PATCH 30/96] added pug template cache to other (#2868)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d425a3961..d923bb9f8 100644
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ Other:
- [Pug Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application
- [pug-ruby](https://github.com/yivo/pug-ruby) gem: Allows to invoke Pug and Jade from Ruby
- [pug-rails](https://github.com/yivo/pug-rails) gem: Integrates Pug and Jade into your Rails application
-
+ - [cache-pug-templates](https://github.com/ladjs/cache-pug-templates) Cache Pug templates for [Lad](https://github.com/ladjs/lad)/[Koa](https://github.com/koajs/koa)/[Express](https://github.com/expressjs/express)/[Connect](https://github.com/senchalabs/connect) with [Redis](https://redis.io/)
## Backers
From 926f7c720112cac76cfedb003e25e9f43d3a1767 Mon Sep 17 00:00:00 2001
From: Florian Chrometz
Date: Wed, 18 Oct 2017 20:01:24 +0200
Subject: [PATCH 31/96] small spelling errors fixed (#2885)
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index d923bb9f8..34f5548e2 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
Full documentation is at [pugjs.org](https://pugjs.org/)
- Pug is a high performance template engine heavily influenced by [Haml](http://haml.info/)
+ Pug is a high-performance template engine heavily influenced by [Haml](http://haml.info/)
and implemented with JavaScript for [Node.js](http://nodejs.org) and browsers. For bug reports,
feature requests and questions, [open an issue](https://github.com/pugjs/pug/issues/new).
For discussion join the [chat room](https://gitter.im/pugjs/pug).
@@ -21,11 +21,11 @@ Full documentation is at [pugjs.org](https://pugjs.org/)
## Rename from "Jade"
-This project was formerly known as "Jade." However, it has been revealed to us that "Jade" is a registered trademark, and as a result a rename is needed. After some discussion among the maintainers, **"Pug"** has been chosen as the new name for this project. The next major version will carry "pug" as the package name.
+This project was formerly known as "Jade." However, it has been revealed to us that "Jade" is a registered trademark, and as a result, a rename is needed. After some discussion among the maintainers, **"Pug"** has been chosen as the new name for this project. The next major version will carry "pug" as the package name.
If your package or app currently uses `jade`, don't worry: we have secured permissions to continue to occupy that package name, although all new versions will be released under `pug`.
-Before the renaming, we had already begun working on an incompatible Jade 2.0.0. We have then made it so that this new major version bump will coincide with the rename to Pug. Therefore, upgrading from Jade to Pug will be the same process as upgrading any other package with a major version bump. Currently, Pug 2.0.0 is still under beta stage, and there are several syntactic differences we have deprecated and removed. Such differences are documented at [#2305](https://github.com/pugjs/pug/issues/2305).
+Before the renaming, we had already begun working on an incompatible Jade 2.0.0. We have then made it so that this new major version bump will coincide with the rename to Pug. Therefore, upgrading from Jade to Pug will be the same process as upgrading any other package with a major version bump. Currently, Pug 2.0.0 is still in beta stage, and there are several syntactic differences we have deprecated and removed. Such differences are documented at [#2305](https://github.com/pugjs/pug/issues/2305).
The website and documentation for Pug are still being updated, but if you are new to Pug, you should get started with the new syntax and install the Pug package on npm.
From 72fbf6a13b01e196bb8d0d42fd0c0104026263d1 Mon Sep 17 00:00:00 2001
From: droooney
Date: Fri, 26 Jan 2018 19:16:35 +0500
Subject: [PATCH 32/96] Apply filters to includes in right-to-left order
(#2932)
[fixes #2929]
---
packages/pug-filters/lib/handle-filters.js | 4 ++--
.../test/__snapshots__/index.test.js.snap | 2 +-
.../test/cases/filters.include.input.json | 9 ++++++++-
packages/pug-filters/test/index.test.js | 2 +-
packages/pug-filters/test/update-test-cases.js | 2 +-
.../test/__snapshots__/index.test.js.snap | 14 ++++++++++----
packages/pug-lexer/test/cases/filters.include.pug | 2 +-
packages/pug-lexer/test/index.test.js | 2 +-
.../test/__snapshots__/index.test.js.snap | 14 +++++++++++---
.../test/cases/filters.include.tokens.json | 13 +++++++------
packages/pug-strip-comments/test/index.test.js | 2 +-
packages/pug/test/__snapshots__/pug.test.js.snap | 8 +++-----
12 files changed, 47 insertions(+), 27 deletions(-)
diff --git a/packages/pug-filters/lib/handle-filters.js b/packages/pug-filters/lib/handle-filters.js
index ce763f146..fc00fb0b4 100644
--- a/packages/pug-filters/lib/handle-filters.js
+++ b/packages/pug-filters/lib/handle-filters.js
@@ -19,13 +19,13 @@ function handleFilters(ast, filters, options, filterAliases) {
node.type = 'Text';
node.val = filterWithFallback(node, text, attrs);
} else if (node.type === 'RawInclude' && node.filters.length) {
- var firstFilter = node.filters.shift();
+ var firstFilter = node.filters.pop();
var attrs = getAttributes(firstFilter, options);
var filename = attrs.filename = node.file.fullPath;
var str = node.file.str;
node.type = 'Text';
node.val = filterFileWithFallback(firstFilter, filename, str, attrs);
- node.filters.forEach(function (filter) {
+ node.filters.slice().reverse().forEach(function (filter) {
var attrs = getAttributes(filter, options);
attrs.filename = filename;
node.val = filterWithFallback(filter, node.val, attrs);
diff --git a/packages/pug-filters/test/__snapshots__/index.test.js.snap b/packages/pug-filters/test/__snapshots__/index.test.js.snap
index b304bd56b..720fd8014 100644
--- a/packages/pug-filters/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-filters/test/__snapshots__/index.test.js.snap
@@ -404,7 +404,7 @@ exports[`test cases/filters.include.input.json 1`] = `
\"type\": \"Text\",
\"line\": 7,
\"filename\": \"filters.include.tokens.json\",
- \"val\": \"(function() {\\n var math;\\n\\n math = {\\n square: function(value) {\\n return value * value;\\n }\\n };\\n\\n}).call(this);\\n\"
+ \"val\": \"\"
}
],
\"line\": 6,
diff --git a/packages/pug-filters/test/cases/filters.include.input.json b/packages/pug-filters/test/cases/filters.include.input.json
index 423856166..c6f57b176 100644
--- a/packages/pug-filters/test/cases/filters.include.input.json
+++ b/packages/pug-filters/test/cases/filters.include.input.json
@@ -102,6 +102,13 @@
"line": 7,
"filename": "filters.include.tokens.json",
"filters": [
+ {
+ "type": "IncludeFilter",
+ "name": "cdata",
+ "attrs": [],
+ "line": 7,
+ "filename": "filters.include.tokens.json"
+ },
{
"type": "IncludeFilter",
"name": "coffee-script",
@@ -150,4 +157,4 @@
],
"line": 0,
"filename": "filters.include.tokens.json"
-}
\ No newline at end of file
+}
diff --git a/packages/pug-filters/test/index.test.js b/packages/pug-filters/test/index.test.js
index 60e4f8efa..01115ab41 100644
--- a/packages/pug-filters/test/index.test.js
+++ b/packages/pug-filters/test/index.test.js
@@ -39,7 +39,7 @@ testCases.forEach(function (filename) {
handleFilters(JSON.parse(read(filename)), customFilters);
throw new Error('Expected ' + filename + ' to throw an exception.');
} catch (ex) {
- if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex;
+ if (!ex || !ex.code || ex.code.indexOf('PUG:') !== 0) throw ex;
actual = {
msg: ex.msg,
code: ex.code,
diff --git a/packages/pug-filters/test/update-test-cases.js b/packages/pug-filters/test/update-test-cases.js
index dfbb56b19..e97423f3e 100644
--- a/packages/pug-filters/test/update-test-cases.js
+++ b/packages/pug-filters/test/update-test-cases.js
@@ -18,7 +18,7 @@ function getError (input, filename) {
handleFilters(input, customFilters);
throw new Error('Expected ' + filename + ' to throw an exception.');
} catch (ex) {
- if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex;
+ if (!ex || !ex.code || ex.code.indexOf('PUG:') !== 0) throw ex;
return {
msg: ex.msg,
code: ex.code,
diff --git a/packages/pug-lexer/test/__snapshots__/index.test.js.snap b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
index 3c77b05e3..c739879a2 100644
--- a/packages/pug-lexer/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
@@ -6939,15 +6939,21 @@ Array [
"col": 14,
"line": 7,
"type": "filter",
+ "val": "cdata",
+ },
+ Object {
+ "col": 20,
+ "line": 7,
+ "type": "filter",
"val": "coffee-script",
},
Object {
- "col": 28,
+ "col": 34,
"line": 7,
"type": "start-attributes",
},
Object {
- "col": 29,
+ "col": 35,
"line": 7,
"mustEscape": true,
"name": "minify",
@@ -6955,12 +6961,12 @@ Array [
"val": "false",
},
Object {
- "col": 41,
+ "col": 47,
"line": 7,
"type": "end-attributes",
},
Object {
- "col": 43,
+ "col": 49,
"line": 7,
"type": "path",
"val": "include-filter-coffee.coffee",
diff --git a/packages/pug-lexer/test/cases/filters.include.pug b/packages/pug-lexer/test/cases/filters.include.pug
index e7ea3db3d..e5083ae5f 100644
--- a/packages/pug-lexer/test/cases/filters.include.pug
+++ b/packages/pug-lexer/test/cases/filters.include.pug
@@ -4,4 +4,4 @@ html
script
include:coffee-script(minify=true) include-filter-coffee.coffee
script
- include:coffee-script(minify=false) include-filter-coffee.coffee
+ include:cdata:coffee-script(minify=false) include-filter-coffee.coffee
diff --git a/packages/pug-lexer/test/index.test.js b/packages/pug-lexer/test/index.test.js
index 325bbd246..19412c19f 100644
--- a/packages/pug-lexer/test/index.test.js
+++ b/packages/pug-lexer/test/index.test.js
@@ -24,7 +24,7 @@ fs.readdirSync(edir).forEach(function (testCase) {
lex(fs.readFileSync(edir + testCase, 'utf8'), {filename: edir + testCase});
throw new Error('Expected ' + testCase + ' to throw an exception.');
} catch (ex) {
- if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex;
+ if (!ex || !ex.code || ex.code.indexOf('PUG:') !== 0) throw ex;
actual = {
msg: ex.msg,
code: ex.code,
diff --git a/packages/pug-parser/test/__snapshots__/index.test.js.snap b/packages/pug-parser/test/__snapshots__/index.test.js.snap
index 10738aba3..f5e7c5ee2 100644
--- a/packages/pug-parser/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-parser/test/__snapshots__/index.test.js.snap
@@ -7205,7 +7205,7 @@ Object {
Object {
"column": 7,
"file": Object {
- "column": 43,
+ "column": 49,
"filename": "filters.include.tokens.json",
"line": 7,
"path": "include-filter-coffee.coffee",
@@ -7213,10 +7213,18 @@ Object {
},
"filename": "filters.include.tokens.json",
"filters": Array [
+ Object {
+ "attrs": Array [],
+ "column": 14,
+ "filename": "filters.include.tokens.json",
+ "line": 7,
+ "name": "cdata",
+ "type": "IncludeFilter",
+ },
Object {
"attrs": Array [
Object {
- "column": 29,
+ "column": 35,
"filename": "filters.include.tokens.json",
"line": 7,
"mustEscape": true,
@@ -7224,7 +7232,7 @@ Object {
"val": "false",
},
],
- "column": 14,
+ "column": 20,
"filename": "filters.include.tokens.json",
"line": 7,
"name": "coffee-script",
diff --git a/packages/pug-parser/test/cases/filters.include.tokens.json b/packages/pug-parser/test/cases/filters.include.tokens.json
index 779425bdb..a2c1ac153 100644
--- a/packages/pug-parser/test/cases/filters.include.tokens.json
+++ b/packages/pug-parser/test/cases/filters.include.tokens.json
@@ -18,12 +18,13 @@
{"type":"tag","line":6,"col":5,"val":"script"}
{"type":"indent","line":7,"col":1,"val":6}
{"type":"include","line":7,"col":7}
-{"type":"filter","line":7,"col":14,"val":"coffee-script"}
-{"type":"start-attributes","line":7,"col":28}
-{"type":"attribute","line":7,"col":29,"name":"minify","val":"false","mustEscape":true}
-{"type":"end-attributes","line":7,"col":41}
-{"type":"path","line":7,"col":43,"val":"include-filter-coffee.coffee"}
+{"type":"filter","line":7,"col":14,"val":"cdata"}
+{"type":"filter","line":7,"col":20,"val":"coffee-script"}
+{"type":"start-attributes","line":7,"col":34}
+{"type":"attribute","line":7,"col":35,"name":"minify","val":"false","mustEscape":true}
+{"type":"end-attributes","line":7,"col":47}
+{"type":"path","line":7,"col":49,"val":"include-filter-coffee.coffee"}
{"type":"outdent","line":8,"col":5}
{"type":"outdent","line":8,"col":3}
{"type":"outdent","line":8,"col":1}
-{"type":"eos","line":8,"col":1}
\ No newline at end of file
+{"type":"eos","line":8,"col":1}
diff --git a/packages/pug-strip-comments/test/index.test.js b/packages/pug-strip-comments/test/index.test.js
index fb0dfdea7..7f3b51c18 100644
--- a/packages/pug-strip-comments/test/index.test.js
+++ b/packages/pug-strip-comments/test/index.test.js
@@ -39,7 +39,7 @@ fs.readdirSync(edir).forEach(function (testCase) {
strip(input);
throw new Error('Expected ' + testCase + ' to throw an exception.');
} catch (ex) {
- if (!ex || !ex.code || !ex.code.indexOf('PUG:') === 0) throw ex;
+ if (!ex || !ex.code || ex.code.indexOf('PUG:') !== 0) throw ex;
expect({
msg: ex.msg,
code: ex.code,
diff --git a/packages/pug/test/__snapshots__/pug.test.js.snap b/packages/pug/test/__snapshots__/pug.test.js.snap
index 1d90c354a..01f24328f 100644
--- a/packages/pug/test/__snapshots__/pug.test.js.snap
+++ b/packages/pug/test/__snapshots__/pug.test.js.snap
@@ -74,11 +74,9 @@ function pug_rethrow(n, e, r, t) {
return (t == r ? \" > \" : \" \") + t + \"| \" + n;
})
.join(\"\\n\");
- throw (
- (n.path = e),
- (n.message = (e || \"Pug\") + \":\" + r + \"\\n\" + i + \"\\n\\n\" + n.message),
- n
- );
+ throw ((n.path = e),
+ (n.message = (e || \"Pug\") + \":\" + r + \"\\n\" + i + \"\\n\\n\" + n.message),
+ n);
}
function template(locals) {
var pug_html = \"\",
From af94a9f103785e7d6c46d64c069eb3f512ba6f9a Mon Sep 17 00:00:00 2001
From: Kyle
Date: Fri, 26 Jan 2018 15:17:17 +0100
Subject: [PATCH 33/96] #2887 Reorganize other languages section (#2928)
---
README.md | 52 ++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 38 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 34f5548e2..83e2700b6 100644
--- a/README.md
+++ b/README.md
@@ -134,25 +134,51 @@ $ pug --client --no-debug filename.pug
which will produce `filename.js` containing the compiled template.
-## Additional Resources
-
-Tutorials:
+## Tutorials
- cssdeck interactive [Pug syntax tutorial](http://cssdeck.com/labs/learning-the-jade-templating-engine-syntax)
- cssdeck interactive [Pug logic tutorial](http://cssdeck.com/labs/jade-templating-tutorial-codecast-part-2)
- [Pug について。](https://gist.github.com/japboy/5402844) (A Japanese Tutorial)
-Implementations in other languages:
+## Implementations in other languages
+
+### Ports in other languages
+
+Ports with very close syntax, adapted to other languages:
+
+ - [PHP](https://github.com/pug-php/pug)
+ - [Java](https://github.com/neuland/jade4j)
+ - [Python](https://github.com/matannoam/pypugjs)
+ - [Ruby](https://github.com/yivo/pug-ruby)
+ - [C# (ASP.NET Core)](https://github.com/AspNetMonsters/pugzor)
+
+### Equivalents in other languages
- - [Larpug - Pug for Laravel](https://github.com/acidjazz/larpug)
- - [php](https://github.com/pug-php/pug)
- - [scala](https://scalate.github.io/scalate/documentation/scaml-reference.html)
- - [ruby](https://github.com/slim-template/slim)
- - [python](https://github.com/matannoam/pypugjs)
- - [java](https://github.com/neuland/jade4j)
- - [C# ASP.NET Core](https://github.com/AspNetMonsters/pugzor)
+Templates engines available in other languages with a different syntax but a similar philosophy:
-Other:
+ - [Scaml for Scala](https://scalate.github.io/scalate/documentation/scaml-reference.html)
+ - [Slim for Ruby](https://github.com/slim-template/slim) (should not be confused with Slim PHP framework)
+ - [HAML for Ruby](http://haml.info/)
+
+### Framework implementations/adapters
+
+Embedded view engines for frameworks:
+
+ - [Laravel](https://github.com/BKWLD/laravel-pug)
+ - [Symfony](https://github.com/pug-php/pug-symfony)
+ - [Phalcon](https://github.com/pug-php/pug-phalcon)
+ - [CodeIgniter](https://github.com/pug-php/ci-pug-engine)
+ - [Yii 2](https://github.com/pug-php/pug-yii2)
+ - [Slim 3](https://github.com/pug-php/pug-slim)
+ - [Silex (implementation example)](https://gist.github.com/kylekatarnls/ba13e4361ab14f4ff5d2a5775eb0cc10)
+ - [Lumen](https://github.com/BKWLD/laravel-pug#use-in-lumen)
+ - [Rails](https://github.com/yivo/pug-rails)
+
+### CMS plugins
+
+ - [WordPress](https://github.com/welaika/wordless)
+
+## Additional Resources
- [Emacs Mode](https://github.com/brianc/jade-mode)
- [Vim Syntax](https://github.com/digitaltoad/vim-pug)
@@ -161,8 +187,6 @@ Other:
- [html2pug](https://github.com/donpark/html2jade) converter
- [pug2php](https://github.com/SE7ENSKY/jade2php) converter
- [Pug Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application
- - [pug-ruby](https://github.com/yivo/pug-ruby) gem: Allows to invoke Pug and Jade from Ruby
- - [pug-rails](https://github.com/yivo/pug-rails) gem: Integrates Pug and Jade into your Rails application
- [cache-pug-templates](https://github.com/ladjs/cache-pug-templates) Cache Pug templates for [Lad](https://github.com/ladjs/lad)/[Koa](https://github.com/koajs/koa)/[Express](https://github.com/expressjs/express)/[Connect](https://github.com/senchalabs/connect) with [Redis](https://redis.io/)
From bd9e0de85b5975d1929887cc53722b02520a5597 Mon Sep 17 00:00:00 2001
From: Denys Pavlov
Date: Mon, 5 Feb 2018 18:32:00 +0800
Subject: [PATCH 34/96] [pug-lexer] Relax class name requirements (#2948)
* Allow class names to begin with single dash, 0-9, a-z, and underscore
* Add test case that passes with change, fails without change
Fixes #2907
---
packages/pug-lexer/index.js | 11 ++---
.../test/__snapshots__/index.test.js.snap | 44 ++++++++++++++++---
packages/pug-lexer/test/cases/classes.pug | 3 ++
3 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js
index f901332d6..73114efea 100644
--- a/packages/pug-lexer/index.js
+++ b/packages/pug-lexer/index.js
@@ -403,20 +403,17 @@ Lexer.prototype = {
*/
className: function() {
- var tok = this.scan(/^\.(-?-?[_a-z][_a-z0-9\-]*)/i, 'class');
+ var tok = this.scan(/^\.([_a-z0-9\-]*[_a-z][_a-z0-9\-]*)/i, 'class');
if (tok) {
this.tokens.push(tok);
this.incrementColumn(tok.val.length);
return true;
}
- if (/^\.\-/i.test(this.input)) {
- this.error('INVALID_CLASS_NAME', 'If a class name begins with a "-" or "--", it must be followed by a letter or underscore.');
- }
- if (/^\.[0-9]/i.test(this.input)) {
- this.error('INVALID_CLASS_NAME', 'Class names must begin with "-", "_" or a letter.');
+ if (/^\.[_a-z0-9\-]+/i.test(this.input)) {
+ this.error('INVALID_CLASS_NAME', 'Class names must contain at least one letter or underscore.');
}
if (/^\./.test(this.input)) {
- this.error('INVALID_CLASS_NAME', '"' + /.[^ \t\(\#\.\:]*/.exec(this.input.substr(1))[0] + '" is not a valid class name. Class names must begin with "-", "_" or a letter and can only contain "_", "-", a-z and 0-9.');
+ this.error('INVALID_CLASS_NAME', '"' + /.[^ \t\(\#\.\:]*/.exec(this.input.substr(1))[0] + '" is not a valid class name. Class names can only contain "_", "-", a-z and 0-9, and must contain at least one of "_", or a-z');
}
},
diff --git a/packages/pug-lexer/test/__snapshots__/index.test.js.snap b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
index c739879a2..527b5da6b 100644
--- a/packages/pug-lexer/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
@@ -3464,12 +3464,46 @@ Array [
},
Object {
"col": 1,
- "line": 12,
+ "line": 13,
"type": "newline",
},
Object {
"col": 1,
- "line": 12,
+ "line": 13,
+ "type": "tag",
+ "val": "a",
+ },
+ Object {
+ "col": 2,
+ "line": 13,
+ "type": "class",
+ "val": "-foo",
+ },
+ Object {
+ "col": 1,
+ "line": 14,
+ "type": "newline",
+ },
+ Object {
+ "col": 1,
+ "line": 14,
+ "type": "tag",
+ "val": "a",
+ },
+ Object {
+ "col": 2,
+ "line": 14,
+ "type": "class",
+ "val": "3foo",
+ },
+ Object {
+ "col": 1,
+ "line": 15,
+ "type": "newline",
+ },
+ Object {
+ "col": 1,
+ "line": 15,
"type": "eos",
},
]
@@ -10689,7 +10723,7 @@ Object {
"code": "PUG:INVALID_CLASS_NAME",
"column": 1,
"line": 1,
- "msg": "Class names must begin with \"-\", \"_\" or a letter.",
+ "msg": "Class names must contain at least one letter or underscore.",
}
`;
@@ -10698,7 +10732,7 @@ Object {
"code": "PUG:INVALID_CLASS_NAME",
"column": 1,
"line": 1,
- "msg": "If a class name begins with a \"-\" or \"--\", it must be followed by a letter or underscore.",
+ "msg": "Class names must contain at least one letter or underscore.",
}
`;
@@ -10707,7 +10741,7 @@ Object {
"code": "PUG:INVALID_CLASS_NAME",
"column": 1,
"line": 1,
- "msg": "\"ä\" is not a valid class name. Class names must begin with \"-\", \"_\" or a letter and can only contain \"_\", \"-\", a-z and 0-9.",
+ "msg": "\"ä\" is not a valid class name. Class names can only contain \"_\", \"-\", a-z and 0-9, and must contain at least one of \"_\", or a-z",
}
`;
diff --git a/packages/pug-lexer/test/cases/classes.pug b/packages/pug-lexer/test/cases/classes.pug
index 67e1a1bc5..699a07586 100644
--- a/packages/pug-lexer/test/cases/classes.pug
+++ b/packages/pug-lexer/test/cases/classes.pug
@@ -9,3 +9,6 @@ a.foo(class='bar').baz
a.foo-bar_baz
a(class={foo: true, bar: false, baz: true})
+
+a.-foo
+a.3foo
From d86ac52be4ec354cd6078797a80030ce3dc9e205 Mon Sep 17 00:00:00 2001
From: kakulukia
Date: Mon, 5 Feb 2018 11:39:55 +0100
Subject: [PATCH 35/96] new maintainer for pypugjs (#2947)
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 83e2700b6..0162a49d1 100644
--- a/README.md
+++ b/README.md
@@ -148,12 +148,13 @@ Ports with very close syntax, adapted to other languages:
- [PHP](https://github.com/pug-php/pug)
- [Java](https://github.com/neuland/jade4j)
- - [Python](https://github.com/matannoam/pypugjs)
+ - [Python](https://github.com/kakulukia/pypugjs)
- [Ruby](https://github.com/yivo/pug-ruby)
- [C# (ASP.NET Core)](https://github.com/AspNetMonsters/pugzor)
### Equivalents in other languages
+
Templates engines available in other languages with a different syntax but a similar philosophy:
- [Scaml for Scala](https://scalate.github.io/scalate/documentation/scaml-reference.html)
From 6f38adf280242be79df276a9d998505c3bbab79a Mon Sep 17 00:00:00 2001
From: void <6258960+ctrlaltdev@users.noreply.github.com>
Date: Tue, 6 Feb 2018 11:47:44 +0100
Subject: [PATCH 36/96] Add in additional resources of 2 packages (#2945)
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0162a49d1..2e857c614 100644
--- a/README.md
+++ b/README.md
@@ -187,7 +187,7 @@ Embedded view engines for frameworks:
- [Coda/SubEtha syntax Mode](https://github.com/aaronmccall/jade.mode)
- [html2pug](https://github.com/donpark/html2jade) converter
- [pug2php](https://github.com/SE7ENSKY/jade2php) converter
- - [Pug Server](https://github.com/ded/jade-server) Ideal for building local prototypes apart from any application
+ - [Pug Server](https://github.com/ctrlaltdev/pug-server) Ideal for building local prototypes apart from any application
- [cache-pug-templates](https://github.com/ladjs/cache-pug-templates) Cache Pug templates for [Lad](https://github.com/ladjs/lad)/[Koa](https://github.com/koajs/koa)/[Express](https://github.com/expressjs/express)/[Connect](https://github.com/senchalabs/connect) with [Redis](https://redis.io/)
From eedf9a3125aaea179dce36468401ef3bfc3db102 Mon Sep 17 00:00:00 2001
From: Eugene Zhlobo
Date: Mon, 12 Feb 2018 13:13:25 +0300
Subject: [PATCH 37/96] Don't ask escaping for boolean attributes at the
beginning of attributes-list (#2956)
* Update tests: Don't ask escaping for the first boolean attribute
* Don't ask escaping for the first attribute w/o value
---
packages/pug-lexer/index.js | 2 +-
.../test/__snapshots__/index.test.js.snap | 22 +++++++++----------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js
index 73114efea..c4f3db5c3 100644
--- a/packages/pug-lexer/index.js
+++ b/packages/pug-lexer/index.js
@@ -1019,7 +1019,7 @@ Lexer.prototype = {
var whitespaceRe = /[ \n\t]/;
var quoteRe = /['"]/;
- var escapedAttr = true
+ var escapedAttr = false
var key = '';
var val = '';
var state = characterParser.defaultState();
diff --git a/packages/pug-lexer/test/__snapshots__/index.test.js.snap b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
index 527b5da6b..368020744 100644
--- a/packages/pug-lexer/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
@@ -634,7 +634,7 @@ Array [
Object {
"col": 3,
"line": 3,
- "mustEscape": true,
+ "mustEscape": false,
"name": "foo",
"type": "attribute",
"val": true,
@@ -808,7 +808,7 @@ Array [
Object {
"col": 10,
"line": 8,
- "mustEscape": true,
+ "mustEscape": false,
"name": "selected",
"type": "attribute",
"val": true,
@@ -985,7 +985,7 @@ Array [
Object {
"col": 3,
"line": 14,
- "mustEscape": true,
+ "mustEscape": false,
"name": "foo",
"type": "attribute",
"val": true,
@@ -1159,7 +1159,7 @@ Array [
Object {
"col": 10,
"line": 19,
- "mustEscape": true,
+ "mustEscape": false,
"name": "selected",
"type": "attribute",
"val": true,
@@ -1318,7 +1318,7 @@ Array [
Object {
"col": 5,
"line": 25,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -1355,7 +1355,7 @@ Array [
Object {
"col": 5,
"line": 27,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -1392,7 +1392,7 @@ Array [
Object {
"col": 5,
"line": 29,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -1429,7 +1429,7 @@ Array [
Object {
"col": 5,
"line": 31,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -1466,7 +1466,7 @@ Array [
Object {
"col": 5,
"line": 33,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -1503,7 +1503,7 @@ Array [
Object {
"col": 5,
"line": 35,
- "mustEscape": true,
+ "mustEscape": false,
"name": "abc",
"type": "attribute",
"val": true,
@@ -16354,7 +16354,7 @@ Array [
Object {
"col": 21,
"line": 7,
- "mustEscape": true,
+ "mustEscape": false,
"name": "something",
"type": "attribute",
"val": true,
From dd27b8bc2b5a57717a30857b5a2e762c759331d8 Mon Sep 17 00:00:00 2001
From: Eugene Zhlobo
Date: Mon, 12 Feb 2018 13:38:41 +0300
Subject: [PATCH 38/96] Add package-lock.json to .gitignore (#2955)
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 54a9acd06..353261164 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ npm-debug.log
**/test/temp
.release.json
lerna-debug.log
+package-lock.json
From 3750dfef23b42ebd71b0d8b03e649b1bf339bc77 Mon Sep 17 00:00:00 2001
From: Eugene Zhlobo
Date: Tue, 13 Feb 2018 20:49:52 +0300
Subject: [PATCH 39/96] Ignore yarn.lock file (#2959)
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index 353261164..e2e102653 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ npm-debug.log
.release.json
lerna-debug.log
package-lock.json
+yarn.lock
From 8248ba89415809d2497ee2f279675793aef20ae2 Mon Sep 17 00:00:00 2001
From: Joshua Sullivan
Date: Thu, 15 Feb 2018 07:25:44 -0800
Subject: [PATCH 40/96] pug-lexer `loc` with source endings (#2957)
* Ignore VSCode files
* Use `loc` on lexer tokens to store source location information
* Update pug-parser and pug to use new `loc` attribute on tokens
* Update parser test cases to have new `loc` attribute on tokens
* New lexer snapshots
* New parser snapshots
* PR review changes
- remove no-ops
- rename `attributeName` to `attribute`
- attributeName no longer takes a tok and returns a reponse object
- minor cleanup
---
.gitignore | 1 +
packages/pug-lexer/index.js | 536 +-
.../test/__snapshots__/index.test.js.snap | 43487 +++++++++++++---
packages/pug-parser/index.js | 196 +-
.../test/__snapshots__/index.test.js.snap | 472 +-
.../test/cases/attr-es2015.tokens.json | 18 +-
.../test/cases/attrs-data.tokens.json | 66 +-
.../test/cases/attrs.js.tokens.json | 156 +-
.../pug-parser/test/cases/attrs.tokens.json | 360 +-
.../test/cases/attrs.unescaped.tokens.json | 30 +-
.../pug-parser/test/cases/basic.tokens.json | 18 +-
.../pug-parser/test/cases/blanks.tokens.json | 26 +-
.../test/cases/block-code.tokens.json | 56 +-
.../block-expansion.shorthands.tokens.json | 22 +-
.../test/cases/block-expansion.tokens.json | 42 +-
.../test/cases/blockquote.tokens.json | 20 +-
.../test/cases/blocks-in-blocks.tokens.json | 18 +-
.../test/cases/blocks-in-if.tokens.json | 88 +-
.../test/cases/case-blocks.tokens.json | 58 +-
.../pug-parser/test/cases/case.tokens.json | 108 +-
.../test/cases/classes-empty.tokens.json | 30 +-
.../pug-parser/test/cases/classes.tokens.json | 48 +-
.../test/cases/code.conditionals.tokens.json | 172 +-
.../test/cases/code.escape.tokens.json | 12 +-
.../test/cases/code.iteration.tokens.json | 142 +-
.../pug-parser/test/cases/code.tokens.json | 80 +-
.../test/cases/comments-in-case.tokens.json | 52 +-
.../test/cases/comments.source.tokens.json | 36 +-
.../test/cases/comments.tokens.json | 122 +-
.../test/cases/doctype.custom.tokens.json | 4 +-
.../test/cases/doctype.default.tokens.json | 22 +-
.../test/cases/doctype.keyword.tokens.json | 4 +-
.../test/cases/each.else.tokens.json | 176 +-
.../test/cases/escape-chars.tokens.json | 12 +-
.../test/cases/escape-test.tokens.json | 40 +-
.../escaping-class-attribute.tokens.json | 62 +-
.../test/cases/filter-in-include.tokens.json | 8 +-
.../test/cases/filters-empty.tokens.json | 32 +-
.../cases/filters.coffeescript.tokens.json | 42 +-
.../test/cases/filters.custom.tokens.json | 42 +-
.../cases/filters.include.custom.tokens.json | 34 +-
.../test/cases/filters.include.tokens.json | 60 +-
.../test/cases/filters.inline.tokens.json | 16 +-
.../test/cases/filters.less.tokens.json | 46 +-
.../test/cases/filters.markdown.tokens.json | 26 +-
.../test/cases/filters.nested.tokens.json | 52 +-
.../test/cases/filters.stylus.tokens.json | 40 +-
.../test/cases/filters.verbatim.tokens.json | 13 +
.../pug-parser/test/cases/html.tokens.json | 52 +-
.../pug-parser/test/cases/html5.tokens.json | 40 +-
.../include-extends-from-root.tokens.json | 8 +-
...ude-extends-of-common-template.tokens.json | 14 +-
.../include-extends-relative.tokens.json | 8 +-
.../cases/include-only-text-body.tokens.json | 14 +-
.../test/cases/include-only-text.tokens.json | 32 +-
.../cases/include-with-text-head.tokens.json | 24 +-
.../test/cases/include-with-text.tokens.json | 34 +-
.../test/cases/include.script.tokens.json | 20 +-
.../cases/include.yield.nested.tokens.json | 22 +-
.../cases/includes-with-ext-js.tokens.json | 18 +-
.../test/cases/includes.tokens.json | 50 +-
.../inheritance.alert-dialog.tokens.json | 26 +-
.../cases/inheritance.defaults.tokens.json | 48 +-
.../inheritance.extend.include.tokens.json | 56 +-
...nheritance.extend.mixins.block.tokens.json | 18 +-
.../inheritance.extend.mixins.tokens.json | 44 +-
.../inheritance.extend.recursive.tokens.json | 18 +-
.../test/cases/inheritance.extend.tokens.json | 40 +-
.../inheritance.extend.whitespace.tokens.json | 40 +-
.../test/cases/inheritance.tokens.json | 40 +-
.../cases/inline-block-comment.tokens.json | 20 +-
.../test/cases/inline-tag.tokens.json | 154 +-
.../cases/intepolated-elements.tokens.json | 76 +-
.../test/cases/interpolated-mixin.tokens.json | 30 +-
.../cases/interpolation.escape.tokens.json | 30 +-
.../test/cases/layout.append.tokens.json | 34 +-
.../layout.append.without-block.tokens.json | 34 +-
...out.multi.append.prepend.block.tokens.json | 92 +-
.../test/cases/layout.prepend.tokens.json | 34 +-
.../layout.prepend.without-block.tokens.json | 34 +-
.../cases/mixin-at-end-of-file.tokens.json | 18 +-
.../cases/mixin-block-with-space.tokens.json | 24 +-
.../test/cases/mixin-hoist.tokens.json | 28 +-
.../test/cases/mixin-via-include.tokens.json | 14 +-
.../test/cases/mixin.attrs.tokens.json | 322 +-
.../mixin.block-tag-behaviour.tokens.json | 112 +-
.../test/cases/mixin.blocks.tokens.json | 216 +-
.../test/cases/mixin.merge.tokens.json | 116 +-
.../test/cases/mixins-unused.tokens.json | 14 +-
.../test/cases/mixins.rest-args.tokens.json | 28 +-
.../pug-parser/test/cases/mixins.tokens.json | 130 +-
.../test/cases/namespaces.tokens.json | 16 +-
.../pug-parser/test/cases/nesting.tokens.json | 46 +-
.../test/cases/pipeless-comments.tokens.json | 18 +-
.../test/cases/pipeless-filters.tokens.json | 18 +-
.../test/cases/pipeless-tag.tokens.json | 28 +-
.../pug-parser/test/cases/pre.tokens.json | 50 +-
.../pug-parser/test/cases/quotes.tokens.json | 12 +-
.../test/cases/regression.1794.tokens.json | 18 +-
.../test/cases/regression.784.tokens.json | 10 +-
.../test/cases/script.whitespace.tokens.json | 28 +-
.../test/cases/scripts.non-js.tokens.json | 58 +-
.../pug-parser/test/cases/scripts.tokens.json | 40 +-
.../test/cases/self-closing-html.tokens.json | 22 +-
.../test/cases/single-period.tokens.json | 6 +-
.../pug-parser/test/cases/source.tokens.json | 42 +-
.../pug-parser/test/cases/styles.tokens.json | 128 +-
.../test/cases/tag-blocks.tokens.json | 32 +-
.../test/cases/tag.interpolation.tokens.json | 132 +-
.../test/cases/tags.self-closing.tokens.json | 120 +-
.../test/cases/template.tokens.json | 54 +-
.../test/cases/text-block.tokens.json | 40 +-
.../pug-parser/test/cases/text.tokens.json | 182 +-
.../pug-parser/test/cases/utf8bom.tokens.json | 8 +-
.../pug-parser/test/cases/vars.tokens.json | 20 +-
.../pug-parser/test/cases/while.tokens.json | 26 +-
.../pug-parser/test/cases/xml.tokens.json | 22 +-
.../yield-before-conditional-head.tokens.json | 36 +-
.../yield-before-conditional.tokens.json | 40 +-
.../test/cases/yield-head.tokens.json | 30 +-
.../test/cases/yield-title-head.tokens.json | 34 +-
.../test/cases/yield-title.tokens.json | 24 +-
.../pug-parser/test/cases/yield.tokens.json | 40 +-
packages/pug/lib/index.js | 3 +-
124 files changed, 39452 insertions(+), 11360 deletions(-)
create mode 100644 packages/pug-parser/test/cases/filters.verbatim.tokens.json
diff --git a/.gitignore b/.gitignore
index e2e102653..09cffd2c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.DS_Store
.idea
+.vscode
testing
node_modules
lib-cov
diff --git a/packages/pug-lexer/index.js b/packages/pug-lexer/index.js
index c4f3db5c3..434e3a048 100644
--- a/packages/pug-lexer/index.js
+++ b/packages/pug-lexer/index.js
@@ -41,6 +41,7 @@ function Lexer(str, options) {
this.indentRe = null;
// If #{}, !{} or #[] syntax is allowed when adding text
this.interpolationAllowed = true;
+ this.whitespaceRe = /[ \n\t]/;
this.tokens = [];
this.ended = false;
@@ -106,12 +107,37 @@ Lexer.prototype = {
*/
tok: function(type, val){
- var res = {type: type, line: this.lineno, col: this.colno};
+ var res = {
+ type: type,
+ loc: {
+ start: {
+ line: this.lineno,
+ column: this.colno
+ },
+ filename: this.filename
+ }
+ };
if (val !== undefined) res.val = val;
return res;
},
+
+ /**
+ * Set the token's `loc.end` value.
+ *
+ * @param {Object} tok
+ * @returns {Object}
+ * @api private
+ */
+
+ tokEnd: function(tok){
+ tok.loc.end = {
+ line: this.lineno,
+ column: this.colno
+ };
+ return tok;
+ },
/**
* Increment `this.lineno` and reset `this.colno`.
@@ -275,9 +301,9 @@ Lexer.prototype = {
this.error('NO_END_BRACKET', 'End of line was reached with no closing bracket for interpolation.');
}
for (var i = 0; this.indentStack[i]; i++) {
- this.tokens.push(this.tok('outdent'));
+ this.tokens.push(this.tokEnd(this.tok('outdent')));
}
- this.tokens.push(this.tok('eos'));
+ this.tokens.push(this.tokEnd(this.tok('eos')));
this.ended = true;
return true;
},
@@ -308,6 +334,7 @@ Lexer.prototype = {
this.interpolationAllowed = tok.buffer;
this.tokens.push(tok);
this.incrementColumn(captures[0].length);
+ this.tokEnd(tok);
this.callLexerFunction('pipelessText');
return true;
}
@@ -330,6 +357,7 @@ Lexer.prototype = {
var lines = splitted.length - 1;
this.incrementLine(lines);
this.incrementColumn(splitted[lines].length + 1); // + 1 → '}'
+ this.tokEnd(tok);
return true;
}
},
@@ -347,6 +375,7 @@ Lexer.prototype = {
tok = this.tok('tag', name);
this.tokens.push(tok);
this.incrementColumn(len);
+ this.tokEnd(tok);
return true;
}
},
@@ -361,6 +390,7 @@ Lexer.prototype = {
if (tok) {
this.tokens.push(tok);
this.incrementColumn(tok.val.length);
+ this.tokEnd(tok);
this.callLexerFunction('attrs');
if (!inInclude) {
this.interpolationAllowed = false;
@@ -377,7 +407,7 @@ Lexer.prototype = {
doctype: function() {
var node = this.scanEndOfLine(/^doctype *([^\n]*)/, 'doctype');
if (node) {
- this.tokens.push(node);
+ this.tokens.push(this.tokEnd(node));
return true;
}
},
@@ -391,6 +421,7 @@ Lexer.prototype = {
if (tok) {
this.tokens.push(tok);
this.incrementColumn(tok.val.length);
+ this.tokEnd(tok);
return true;
}
if (/^#/.test(this.input)) {
@@ -407,6 +438,7 @@ Lexer.prototype = {
if (tok) {
this.tokens.push(tok);
this.incrementColumn(tok.val.length);
+ this.tokEnd(tok);
return true;
}
if (/^\.[_a-z0-9\-]+/i.test(this.input)) {
@@ -428,8 +460,10 @@ Lexer.prototype = {
}
},
addText: function (type, value, prefix, escaped) {
+ var tok;
if (value + prefix === '') return;
prefix = prefix || '';
+ escaped = escaped || 0;
var indexOfEnd = this.interpolated ? value.indexOf(']') : -1;
var indexOfStart = this.interpolationAllowed ? value.indexOf('#[') : -1;
var indexOfEscaped = this.interpolationAllowed ? value.indexOf('\\#[') : -1;
@@ -442,14 +476,15 @@ Lexer.prototype = {
if (indexOfEscaped !== Infinity && indexOfEscaped < indexOfEnd && indexOfEscaped < indexOfStart && indexOfEscaped < indexOfStringInterp) {
prefix = prefix + value.substring(0, indexOfEscaped) + '#[';
- return this.addText(type, value.substring(indexOfEscaped + 3), prefix, true);
+ return this.addText(type, value.substring(indexOfEscaped + 3), prefix, escaped + 1);
}
if (indexOfStart !== Infinity && indexOfStart < indexOfEnd && indexOfStart < indexOfEscaped && indexOfStart < indexOfStringInterp) {
- this.tokens.push(this.tok(type, prefix + value.substring(0, indexOfStart)));
- this.incrementColumn(prefix.length + indexOfStart);
- if (escaped) this.incrementColumn(1);
- this.tokens.push(this.tok('start-pug-interpolation'));
+ tok = this.tok(type, prefix + value.substring(0, indexOfStart));
+ this.incrementColumn(prefix.length + indexOfStart + escaped);
+ this.tokens.push(this.tokEnd(tok));
+ tok = this.tok('start-pug-interpolation');
this.incrementColumn(2);
+ this.tokens.push(this.tokEnd(tok));
var child = new this.constructor(value.substr(indexOfStart + 2), {
filename: this.filename,
interpolated: true,
@@ -468,8 +503,9 @@ Lexer.prototype = {
}
this.colno = child.colno;
this.tokens = this.tokens.concat(interpolated);
- this.tokens.push(this.tok('end-pug-interpolation'));
+ tok = this.tok('end-pug-interpolation');
this.incrementColumn(1);
+ this.tokens.push(this.tokEnd(tok));
this.addText(type, child.input);
return;
}
@@ -484,18 +520,19 @@ Lexer.prototype = {
if (indexOfStringInterp !== Infinity) {
if (matchOfStringInterp[1]) {
prefix = prefix + value.substring(0, indexOfStringInterp) + '#{';
- return this.addText(type, value.substring(indexOfStringInterp + 3), prefix);
+ return this.addText(type, value.substring(indexOfStringInterp + 3), prefix, escaped + 1);
}
var before = value.substr(0, indexOfStringInterp);
if (prefix || before) {
before = prefix + before;
- this.tokens.push(this.tok(type, before));
- this.incrementColumn(before.length);
+ tok = this.tok(type, before);
+ this.incrementColumn(before.length + escaped);
+ this.tokens.push(this.tokEnd(tok));
}
var rest = matchOfStringInterp[3];
var range;
- var tok = this.tok('interpolated-code');
+ tok = this.tok('interpolated-code');
this.incrementColumn(2);
try {
range = characterParser.parseUntil(rest, '}');
@@ -515,21 +552,23 @@ Lexer.prototype = {
tok.buffer = true;
tok.val = range.src;
this.assertExpression(range.src);
- this.tokens.push(tok);
if (range.end + 1 < rest.length) {
rest = rest.substr(range.end + 1);
this.incrementColumn(range.end + 1);
+ this.tokens.push(this.tokEnd(tok));
this.addText(type, rest);
} else {
this.incrementColumn(rest.length);
+ this.tokens.push(this.tokEnd(tok));
}
return;
}
value = prefix + value;
- this.tokens.push(this.tok(type, value));
- this.incrementColumn(value.length);
+ tok = this.tok(type, value);
+ this.incrementColumn(value.length + escaped);
+ this.tokens.push(this.tokEnd(tok));
},
text: function() {
@@ -557,7 +596,7 @@ Lexer.prototype = {
dot: function() {
var tok;
if (tok = this.scanEndOfLine(/^\./, 'dot')) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
this.callLexerFunction('pipelessText');
return true;
}
@@ -570,7 +609,7 @@ Lexer.prototype = {
"extends": function() {
var tok = this.scan(/^extends?(?= |$|\n)/, 'extends');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
if (!this.callLexerFunction('path')) {
this.error('NO_EXTENDS_PATH', 'missing path for extends');
}
@@ -595,10 +634,14 @@ Lexer.prototype = {
name = name.split('//')[0].trim();
}
if (!name) return;
- this.consume(captures[0].length - comment.length);
var tok = this.tok('block', name);
+ var len = captures[0].length - comment.length;
+ while(this.whitespaceRe.test(this.input.charAt(len - 1))) len--;
+ this.incrementColumn(len);
tok.mode = 'prepend';
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
+ this.consume(captures[0].length - comment.length);
+ this.incrementColumn(captures[0].length - comment.length - len);
return true;
}
},
@@ -617,10 +660,14 @@ Lexer.prototype = {
name = name.split('//')[0].trim();
}
if (!name) return;
- this.consume(captures[0].length - comment.length);
var tok = this.tok('block', name);
+ var len = captures[0].length - comment.length;
+ while(this.whitespaceRe.test(this.input.charAt(len - 1))) len--;
+ this.incrementColumn(len);
tok.mode = 'append';
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
+ this.consume(captures[0].length - comment.length);
+ this.incrementColumn(captures[0].length - comment.length - len);
return true;
}
},
@@ -639,10 +686,14 @@ Lexer.prototype = {
name = name.split('//')[0].trim();
}
if (!name) return;
- this.consume(captures[0].length - comment.length);
var tok = this.tok('block', name);
+ var len = captures[0].length - comment.length;
+ while(this.whitespaceRe.test(this.input.charAt(len - 1))) len--;
+ this.incrementColumn(len);
tok.mode = 'replace';
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
+ this.consume(captures[0].length - comment.length);
+ this.incrementColumn(captures[0].length - comment.length - len);
return true;
}
},
@@ -654,7 +705,7 @@ Lexer.prototype = {
mixinBlock: function() {
var tok;
if (tok = this.scanEndOfLine(/^block/, 'mixin-block')) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -666,7 +717,7 @@ Lexer.prototype = {
'yield': function() {
var tok = this.scanEndOfLine(/^yield/, 'yield');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -678,7 +729,7 @@ Lexer.prototype = {
include: function() {
var tok = this.scan(/^include(?=:| |$|\n)/, 'include');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
while (this.callLexerFunction('filter', { inInclude: true }));
if (!this.callLexerFunction('path')) {
if (/^[^ \n]+/.test(this.input)) {
@@ -703,7 +754,7 @@ Lexer.prototype = {
path: function() {
var tok = this.scanEndOfLine(/^ ([^\n]+)/, 'path');
if (tok && (tok.val = tok.val.trim())) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -718,7 +769,7 @@ Lexer.prototype = {
this.incrementColumn(-tok.val.length);
this.assertExpression(tok.val);
this.incrementColumn(tok.val.length);
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
if (this.scan(/^case\b/)) {
@@ -747,7 +798,7 @@ Lexer.prototype = {
this.incrementColumn(-tok.val.length);
this.assertExpression(tok.val);
this.incrementColumn(tok.val.length);
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
if (this.scan(/^when\b/)) {
@@ -762,7 +813,7 @@ Lexer.prototype = {
"default": function() {
var tok = this.scanEndOfLine(/^default/, 'default');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
if (this.scan(/^default\b/)) {
@@ -813,7 +864,7 @@ Lexer.prototype = {
}
}
}
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -828,7 +879,8 @@ Lexer.prototype = {
this.consume(captures[0].length);
var tok = this.tok('mixin', captures[1]);
tok.args = captures[2] || null;
- this.tokens.push(tok);
+ this.incrementColumn(captures[0].length);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -866,7 +918,8 @@ Lexer.prototype = {
}
break;
}
- this.tokens.push(tok);
+ this.incrementColumn(js.length);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -876,11 +929,13 @@ Lexer.prototype = {
*/
"while": function() {
- var captures;
+ var captures, tok;
if (captures = /^while +([^\n]+)/.exec(this.input)) {
this.consume(captures[0].length);
- this.assertExpression(captures[1])
- this.tokens.push(this.tok('while', captures[1]));
+ this.assertExpression(captures[1]);
+ tok = this.tok('while', captures[1]);
+ this.incrementColumn(captures[0].length);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
if (this.scan(/^while\b/)) {
@@ -902,7 +957,7 @@ Lexer.prototype = {
this.assertExpression(captures[3])
tok.code = captures[3];
this.incrementColumn(captures[3].length);
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
if (this.scan(/^(?:each|for)\b/)) {
@@ -980,6 +1035,7 @@ Lexer.prototype = {
// --- code
// ^ after colno
this.incrementColumn(code.length);
+ this.tokEnd(tok);
return true;
}
},
@@ -990,172 +1046,242 @@ Lexer.prototype = {
blockCode: function() {
var tok
if (tok = this.scanEndOfLine(/^-/, 'blockcode')) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
this.interpolationAllowed = false;
this.callLexerFunction('pipelessText');
return true;
}
},
-
+
/**
- * Attributes.
+ * Attribute Name.
*/
-
- attrs: function() {
- if ('(' == this.input.charAt(0)) {
- var startingLine = this.lineno;
- this.tokens.push(this.tok('start-attributes'));
- var index = this.bracketExpression().end
- , str = this.input.substr(1, index-1);
-
+ attribute: function(str){
+ var quote = '';
+ var quoteRe = /['"]/;
+ var key = '';
+ var i;
+
+ // consume all whitespace before the key
+ for(i = 0; i < str.length; i++){
+ if(!this.whitespaceRe.test(str[i])) break;
+ if(str[i] === '\n'){
+ this.incrementLine(1);
+ } else {
+ this.incrementColumn(1);
+ }
+ }
+
+ if(i === str.length){
+ return '';
+ }
+
+ var tok = this.tok('attribute');
+
+ // quote?
+ if(quoteRe.test(str[i])){
+ quote = str[i];
this.incrementColumn(1);
- this.assertNestingCorrect(str);
-
- var quote = '';
- var self = this;
-
- this.consume(index + 1);
-
- var whitespaceRe = /[ \n\t]/;
- var quoteRe = /['"]/;
-
- var escapedAttr = false
- var key = '';
- var val = '';
- var state = characterParser.defaultState();
- var lineno = startingLine;
- var colnoBeginAttr = this.colno;
- var colnoBeginVal;
- var loc = 'key';
- var isEndOfAttribute = function (i) {
- // if the key is not started, then the attribute cannot be ended
- if (key.trim() === '') {
- colnoBeginAttr = this.colno;
- return false;
+ i++;
+ }
+
+ // start looping through the key
+ for (; i < str.length; i++) {
+
+ if(quote){
+ if (str[i] === quote) {
+ this.incrementColumn(1);
+ i++;
+ break;
}
- // if there's nothing more then the attribute must be ended
- if (i === str.length) return true;
-
- if (loc === 'key') {
- if (whitespaceRe.test(str[i])) {
- // find the first non-whitespace character
- for (var x = i; x < str.length; x++) {
- if (!whitespaceRe.test(str[x])) {
- // starts a `value`
- if (str[x] === '=' || str[x] === '!') return false;
- // will be handled when x === i
- else if (str[x] === ',') return false;
- // attribute ended
- else return true;
+ } else {
+ if(this.whitespaceRe.test(str[i]) || str[i] === '!' || str[i] === '=' || str[i] === ',') {
+ break;
+ }
+ }
+
+ key += str[i];
+
+ if (str[i] === '\n') {
+ this.incrementLine(1);
+ } else {
+ this.incrementColumn(1);
+ }
+ }
+
+ tok.name = key;
+
+ var valueResponse = this.attributeValue(str.substr(i));
+
+ if (valueResponse.val) {
+ tok.val = valueResponse.val;
+ tok.mustEscape = valueResponse.mustEscape;
+ } else {
+ // was a boolean attribute (ex: `input(disabled)`)
+ tok.val = true;
+ tok.mustEscape = true;
+ }
+
+ str = valueResponse.remainingSource;
+
+ this.tokens.push(this.tokEnd(tok));
+
+ for(i = 0; i < str.length; i++){
+ if(!this.whitespaceRe.test(str[i])) {
+ break;
+ }
+ if(str[i] === '\n'){
+ this.incrementLine(1);
+ } else {
+ this.incrementColumn(1);
+ }
+ }
+
+ if(str[i] === ','){
+ this.incrementColumn(1);
+ i++;
+ }
+
+ return str.substr(i);
+ },
+
+ /**
+ * Attribute Value.
+ */
+ attributeValue: function(str){
+ var quoteRe = /['"]/;
+ var val = '';
+ var done, i, x;
+ var escapeAttr = true;
+ var state = characterParser.defaultState();
+ var col = this.colno;
+ var line = this.lineno;
+
+ // consume all whitespace before the equals sign
+ for(i = 0; i < str.length; i++){
+ if(!this.whitespaceRe.test(str[i])) break;
+ if(str[i] === '\n'){
+ line++;
+ col = 1;
+ } else {
+ col++;
+ }
+ }
+
+ if(i === str.length){
+ return { remainingSource: str };
+ }
+
+ if(str[i] === '!'){
+ escapeAttr = false;
+ col++;
+ i++;
+ if (str[i] !== '=') this.error('INVALID_KEY_CHARACTER', 'Unexpected character ' + str[i] + ' expected `=`');
+ }
+
+ if(str[i] !== '='){
+ // check for anti-pattern `div("foo"bar)`
+ if (i === 0 && str && !this.whitespaceRe.test(str[0]) && str[0] !== ','){
+ this.error('INVALID_KEY_CHARACTER', 'Unexpected character ' + str[0] + ' expected `=`');
+ } else {
+ return { remainingSource: str };
+ }
+ }
+
+ this.lineno = line;
+ this.colno = col + 1;
+ i++;
+
+ // consume all whitespace before the value
+ for(; i < str.length; i++){
+ if(!this.whitespaceRe.test(str[i])) break;
+ if(str[i] === '\n'){
+ this.incrementLine(1);
+ } else {
+ this.incrementColumn(1);
+ }
+ }
+
+ line = this.lineno;
+ col = this.colno;
+
+ // start looping through the value
+ for (; i < str.length; i++) {
+ // if the character is in a string or in parentheses/brackets/braces
+ if (!(state.isNesting() || state.isString())){
+
+ if (this.whitespaceRe.test(str[i])) {
+ done = false;
+
+ // find the first non-whitespace character
+ for (x = i; x < str.length; x++) {
+ if (!this.whitespaceRe.test(str[x])) {
+ // if it is a JavaScript punctuator, then assume that it is
+ // a part of the value
+ if((!characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]) || str[x] === ':') && this.assertExpression(val, true)){
+ done = true;
}
+ break;
}
}
- // if there's no whitespace and the character is not ',', the
- // attribute did not end.
- return str[i] === ',';
- } else if (loc === 'value') {
- // if the character is in a string or in parentheses/brackets/braces
- if (state.isNesting() || state.isString()) return false;
-
- // if the current value expression is not valid JavaScript, then
- // assume that the user did not end the value. To enforce this,
- // we call `self.assertExpression(val, true)`, but since the other
- // tests are much faster, we run the other tests first.
-
- if (whitespaceRe.test(str[i])) {
- // find the first non-whitespace character
- for (var x = i; x < str.length; x++) {
- if (!whitespaceRe.test(str[x])) {
- // if it is a JavaScript punctuator, then assume that it is
- // a part of the value
- return (!characterParser.isPunctuator(str[x]) || quoteRe.test(str[x]) || str[x] === ':') && self.assertExpression(val, true);
- }
- }
+
+ // if everything else is whitespace, return now so last attribute
+ // does not include trailing whitespace
+ if(done || x === str.length){
+ break;
}
- // if there's no whitespace and the character is not ',', the
- // attribute did not end.
- return str[i] === ',' && self.assertExpression(val, true);
+ }
+
+ // if there's no whitespace and the character is not ',', the
+ // attribute did not end.
+ if(str[i] === ',' && this.assertExpression(val, true)){
+ break;
}
}
+
+ state = characterParser.parseChar(str[i], state);
+ val += str[i];
+
+ if (str[i] === '\n') {
+ line++;
+ col = 1;
+ } else {
+ col++;
+ }
+ }
+
+ this.assertExpression(val);
+
+ this.lineno = line;
+ this.colno = col;
+
+ return { val: val, mustEscape: escapeAttr, remainingSource: str.substr(i) };
+ },
- for (var i = 0; i <= str.length; i++) {
- if (isEndOfAttribute.call(this, i)) {
- if (val.trim()) {
- var saved = this.colno;
- this.colno = colnoBeginVal;
- this.assertExpression(val);
- this.colno = saved;
- }
-
- val = val.trim();
-
- key = key.trim();
- key = key.replace(/^['"]|['"]$/g, '');
+ /**
+ * Attributes.
+ */
+
+ attrs: function() {
+ var tok;
+
+ if ('(' == this.input.charAt(0)) {
+ tok = this.tok('start-attributes');
+ var index = this.bracketExpression().end;
+ var str = this.input.substr(1, index-1);
- var tok = this.tok('attribute');
- tok.name = key;
- tok.val = '' == val ? true : val;
- tok.col = colnoBeginAttr;
- tok.mustEscape = escapedAttr;
- this.tokens.push(tok);
+ this.incrementColumn(1);
+ this.tokens.push(this.tokEnd(tok));
+ this.assertNestingCorrect(str);
+ this.consume(index + 1);
- key = val = '';
- loc = 'key';
- escapedAttr = false;
- this.lineno = lineno;
- } else {
- switch (loc) {
- case 'key-char':
- if (str[i] === quote) {
- loc = 'key';
- if (i + 1 < str.length && !/[ ,!=\n\t]/.test(str[i + 1]))
- this.error('INVALID_KEY_CHARACTER', 'Unexpected character "' + str[i + 1] + '" expected ` `, `\\n`, `\t`, `,`, `!` or `=`');
- } else {
- key += str[i];
- }
- break;
- case 'key':
- if (key === '' && quoteRe.test(str[i])) {
- loc = 'key-char';
- quote = str[i];
- } else if (str[i] === '!' || str[i] === '=') {
- escapedAttr = str[i] !== '!';
- if (str[i] === '!') {
- this.incrementColumn(1);
- i++;
- }
- if (str[i] !== '=') this.error('INVALID_KEY_CHARACTER', 'Unexpected character ' + str[i] + ' expected `=`');
- loc = 'value';
- colnoBeginVal = this.colno + 1;
- state = characterParser.defaultState();
- } else {
- key += str[i]
- }
- break;
- case 'value':
- state = characterParser.parseChar(str[i], state);
- val += str[i];
- break;
- }
- }
- if (str[i] === '\n') {
- // Save the line number locally to keep this.lineno at the start of
- // the attribute.
- lineno++;
- this.colno = 1;
- // If the key has not been started, update this.lineno immediately.
- if (!key.trim()) this.lineno = lineno;
- } else if (str[i] !== undefined) {
- this.incrementColumn(1);
- }
+ while(str){
+ str = this.attribute(str);
}
- // Reset the line numbers based on the line started on
- // plus the number of newline characters encountered
- this.lineno = startingLine + (str.match(/\n/g) || []).length;
-
- this.tokens.push(this.tok('end-attributes'));
+ tok = this.tok('end-attributes');
this.incrementColumn(1);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -1173,8 +1299,8 @@ Lexer.prototype = {
consumed = args.end + 1;
this.consume(consumed);
tok.val = args.src;
- this.tokens.push(tok);
this.incrementColumn(consumed);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -1185,6 +1311,7 @@ Lexer.prototype = {
indent: function() {
var captures = this.scanIndentation();
+ var tok;
if (captures) {
var indents = captures[1].length;
@@ -1199,28 +1326,36 @@ Lexer.prototype = {
// blank line
if ('\n' == this.input[0]) {
this.interpolationAllowed = true;
- return this.tok('newline');
+ return this.tokEnd(this.tok('newline'));
}
// outdent
if (indents < this.indentStack[0]) {
+ var outdent_count = 0;
while (this.indentStack[0] > indents) {
if (this.indentStack[1] < indents) {
this.error('INCONSISTENT_INDENTATION', 'Inconsistent indentation. Expecting either ' + this.indentStack[1] + ' or ' + this.indentStack[0] + ' spaces/tabs.');
}
- this.colno = this.indentStack[1] + 1;
- this.tokens.push(this.tok('outdent'));
+ outdent_count++;
this.indentStack.shift();
}
+ while(outdent_count--){
+ this.colno = 1;
+ tok = this.tok('outdent');
+ this.colno = this.indentStack[0] + 1;
+ this.tokens.push(this.tokEnd(tok));
+ }
// indent
} else if (indents && indents != this.indentStack[0]) {
- this.tokens.push(this.tok('indent', indents));
+ tok = this.tok('indent', indents);
this.colno = 1 + indents;
+ this.tokens.push(this.tokEnd(tok));
this.indentStack.unshift(indents);
// newline
} else {
- this.tokens.push(this.tok('newline'));
- this.colno = 1 + (this.indentStack[0] || 0);
+ tok = this.tok('newline');
+ this.colno = 1 + Math.min(this.indentStack[0] || 0, indents);
+ this.tokens.push(this.tokEnd(tok));
}
this.interpolationAllowed = true;
@@ -1235,8 +1370,9 @@ Lexer.prototype = {
indents = indents || captures && captures[1].length;
if (indents > this.indentStack[0]) {
- this.tokens.push(this.tok('start-pipeless-text'));
+ this.tokens.push(this.tokEnd(this.tok('start-pipeless-text')));
var tokens = [];
+ var token_indent = [];
var isMatch;
// Index in this.input. Can't use this.consume because we might need to
// retry lexing the block.
@@ -1248,7 +1384,9 @@ Lexer.prototype = {
var str = this.input.substr(stringPtr + 1, i);
var lineCaptures = this.indentRe.exec('\n' + str);
var lineIndents = lineCaptures && lineCaptures[1].length;
- isMatch = lineIndents >= indents || !str.trim();
+ isMatch = lineIndents >= indents;
+ token_indent.push(isMatch);
+ isMatch = isMatch || !str.trim();
if (isMatch) {
// consume test along with `\n` prefix if match
stringPtr += str.length + 1;
@@ -1263,12 +1401,14 @@ Lexer.prototype = {
this.consume(stringPtr);
while (this.input.length === 0 && tokens[tokens.length - 1] === '') tokens.pop();
tokens.forEach(function (token, i) {
+ var tok;
this.incrementLine(1);
- if (i !== 0) this.tokens.push(this.tok('newline'));
- this.incrementColumn(indents);
+ if (i !== 0) tok = this.tok('newline');
+ if (token_indent[i]) this.incrementColumn(indents);
+ if (tok) this.tokens.push(this.tokEnd(tok));
this.addText('text', token);
}.bind(this));
- this.tokens.push(this.tok('end-pipeless-text'));
+ this.tokens.push(this.tokEnd(this.tok('end-pipeless-text')));
return true;
}
},
@@ -1280,7 +1420,7 @@ Lexer.prototype = {
slash: function() {
var tok = this.scan(/^\//, 'slash');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
@@ -1292,7 +1432,7 @@ Lexer.prototype = {
colon: function() {
var tok = this.scan(/^: +/, ':');
if (tok) {
- this.tokens.push(tok);
+ this.tokens.push(this.tokEnd(tok));
return true;
}
},
diff --git a/packages/pug-lexer/test/__snapshots__/index.test.js.snap b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
index 368020744..0484b309b 100644
--- a/packages/pug-lexer/test/__snapshots__/index.test.js.snap
+++ b/packages/pug-lexer/test/__snapshots__/index.test.js.snap
@@ -2,55 +2,136 @@ exports[`test attr-es2015.pug 1`] = `
Array [
Object {
"buffer": false,
- "col": 1,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 50,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 1,
+ "line": 1,
+ },
+ },
"mustEscape": false,
"type": "code",
"val": "var avatar = \'219b77f9d21de75e81851b6b886057c7\'",
},
Object {
- "col": 1,
- "line": 3,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 4,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
"type": "tag",
"val": "div",
},
Object {
- "col": 4,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 15,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 4,
+ "line": 3,
+ },
+ },
"type": "class",
"val": "avatar-div",
},
Object {
- "col": 15,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 15,
+ "line": 3,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 16,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 88,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 16,
+ "line": 3,
+ },
+ },
"mustEscape": true,
"name": "style",
"type": "attribute",
"val": "\`background-image: url(https://www.gravatar.com/avatar/\${avatar})\`",
},
Object {
- "col": 88,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 89,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 88,
+ "line": 3,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 4,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attr-es2015.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
"type": "eos",
},
]
@@ -69,474 +150,1176 @@ exports[`test attrs.js.pug 1`] = `
Array [
Object {
"buffer": false,
- "col": 1,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 13,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 1,
+ },
+ },
"mustEscape": false,
"type": "code",
"val": "var id = 5",
},
Object {
- "col": 1,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 2,
+ },
+ },
"type": "newline",
},
Object {
"buffer": false,
- "col": 1,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 35,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 2,
+ },
+ },
"mustEscape": false,
"type": "code",
"val": "function answer() { return 42; }",
},
Object {
- "col": 1,
- "line": 3,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 3,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 21,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 3,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/user/\' + id",
},
Object {
- "col": 23,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 37,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 23,
+ "line": 3,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "\'button\'",
},
Object {
- "col": 37,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 38,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 37,
+ "line": 3,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 4,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 4,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 25,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 4,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/user/\' + id",
},
Object {
- "col": 27,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 45,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 27,
+ "line": 4,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "\'button\'",
},
Object {
- "col": 45,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 46,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 45,
+ "line": 4,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 5,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 5,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 5,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 5,
+ },
+ },
"type": "tag",
"val": "meta",
},
Object {
- "col": 5,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 6,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 5,
+ "line": 5,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 6,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 18,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 6,
+ "line": 5,
+ },
+ },
"mustEscape": true,
"name": "key",
"type": "attribute",
"val": "\'answer\'",
},
Object {
- "col": 20,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 34,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 20,
+ "line": 5,
+ },
+ },
"mustEscape": true,
"name": "value",
"type": "attribute",
"val": "answer()",
},
Object {
- "col": 34,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 35,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 34,
+ "line": 5,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 6,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 6,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 6,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 6,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 6,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 6,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 6,
+ "loc": Object {
+ "end": Object {
+ "column": 31,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 6,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "[\'class1\', \'class2\']",
},
Object {
- "col": 31,
- "line": 6,
+ "loc": Object {
+ "end": Object {
+ "column": 32,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 31,
+ "line": 6,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 7,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 7,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 7,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 12,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 7,
+ },
+ },
"type": "class",
"val": "tag-class",
},
Object {
- "col": 12,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 13,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 12,
+ "line": 7,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 13,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 41,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 13,
+ "line": 7,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "[\'class1\', \'class2\']",
},
Object {
- "col": 41,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 42,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 41,
+ "line": 7,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 9,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 9,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 9,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 9,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 21,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 9,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/user/\' + id",
},
Object {
- "col": 22,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 36,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 22,
+ "line": 9,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "\'button\'",
},
Object {
- "col": 36,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 37,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 36,
+ "line": 9,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 10,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 10,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 10,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 10,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 25,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 10,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/user/\' + id",
},
Object {
- "col": 26,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 44,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 26,
+ "line": 10,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "\'button\'",
},
Object {
- "col": 44,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 45,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 44,
+ "line": 10,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 11,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 11,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 11,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 5,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 11,
+ },
+ },
"type": "tag",
"val": "meta",
},
Object {
- "col": 5,
- "line": 11,
+ "loc": Object {
+ "end": Object {
+ "column": 6,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 5,
+ "line": 11,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 6,
- "line": 11,
+ "loc": Object {
+ "end": Object {
+ "column": 18,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 6,
+ "line": 11,
+ },
+ },
"mustEscape": true,
"name": "key",
"type": "attribute",
"val": "\'answer\'",
},
Object {
- "col": 19,
- "line": 11,
+ "loc": Object {
+ "end": Object {
+ "column": 33,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 19,
+ "line": 11,
+ },
+ },
"mustEscape": true,
"name": "value",
"type": "attribute",
"val": "answer()",
},
Object {
- "col": 33,
- "line": 11,
+ "loc": Object {
+ "end": Object {
+ "column": 34,
+ "line": 11,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 33,
+ "line": 11,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 12,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 12,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 12,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 12,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 31,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 3,
+ "line": 12,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "[\'class1\', \'class2\']",
},
Object {
- "col": 31,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 32,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 31,
+ "line": 12,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 13,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 13,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 13,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 12,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 2,
+ "line": 13,
+ },
+ },
"type": "class",
"val": "tag-class",
},
Object {
- "col": 12,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 13,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 12,
+ "line": 13,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 13,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 41,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 13,
+ "line": 13,
+ },
+ },
"mustEscape": true,
"name": "class",
"type": "attribute",
"val": "[\'class1\', \'class2\']",
},
Object {
- "col": 41,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 42,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 41,
+ "line": 13,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 15,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 15,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 4,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 15,
+ },
+ },
"type": "tag",
"val": "div",
},
Object {
- "col": 4,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 5,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 4,
+ "line": 15,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 5,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 10,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 5,
+ "line": 15,
+ },
+ },
"mustEscape": true,
"name": "id",
"type": "attribute",
"val": "id",
},
Object {
- "col": 10,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 11,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 10,
+ "line": 15,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 11,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 36,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 11,
+ "line": 15,
+ },
+ },
"type": "&attributes",
"val": "{foo: \'bar\'}",
},
Object {
- "col": 1,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 16,
+ },
+ },
"type": "newline",
},
Object {
"buffer": false,
- "col": 1,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 17,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 16,
+ },
+ },
"mustEscape": false,
"type": "code",
"val": "var bar = null",
},
Object {
- "col": 1,
- "line": 17,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 17,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 4,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 17,
+ },
+ },
"type": "tag",
"val": "div",
},
Object {
- "col": 4,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 5,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 4,
+ "line": 17,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 5,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 13,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 5,
+ "line": 17,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "null",
},
Object {
- "col": 14,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 21,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 14,
+ "line": 17,
+ },
+ },
"mustEscape": true,
"name": "bar",
"type": "attribute",
"val": "bar",
},
Object {
- "col": 21,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 22,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 21,
+ "line": 17,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 22,
- "line": 17,
+ "loc": Object {
+ "end": Object {
+ "column": 47,
+ "line": 17,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 22,
+ "line": 17,
+ },
+ },
"type": "&attributes",
"val": "{baz: \'baz\'}",
},
Object {
- "col": 1,
- "line": 18,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 18,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 18,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 18,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 18,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.js.pug",
+ "start": Object {
+ "column": 1,
+ "line": 18,
+ },
+ },
"type": "eos",
},
]
@@ -545,1094 +1328,2714 @@ Array [
exports[`test attrs.pug 1`] = `
Array [
Object {
- "col": 1,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 1,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 1,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 18,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 1,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/contact\'",
},
Object {
- "col": 18,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 19,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 18,
+ "line": 1,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 20,
- "line": 1,
+ "loc": Object {
+ "end": Object {
+ "column": 27,
+ "line": 1,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 20,
+ "line": 1,
+ },
+ },
"type": "text",
"val": "contact",
},
Object {
- "col": 1,
- "line": 2,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 2,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 2,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 2,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 15,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 2,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/save\'",
},
Object {
- "col": 15,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 15,
+ "line": 2,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 16,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 23,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 16,
+ "line": 2,
+ },
+ },
"type": "class",
"val": "button",
},
Object {
- "col": 24,
- "line": 2,
+ "loc": Object {
+ "end": Object {
+ "column": 28,
+ "line": 2,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 24,
+ "line": 2,
+ },
+ },
"type": "text",
"val": "save",
},
Object {
- "col": 1,
- "line": 3,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 3,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 3,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 3,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 6,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 3,
+ },
+ },
+ "mustEscape": true,
"name": "foo",
"type": "attribute",
"val": true,
},
Object {
- "col": 8,
- "line": 3,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 11,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 8,
+ "line": 3,
+ },
+ },
+ "mustEscape": true,
"name": "bar",
"type": "attribute",
"val": true,
},
Object {
- "col": 13,
- "line": 3,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 13,
+ "line": 3,
+ },
+ },
+ "mustEscape": true,
"name": "baz",
"type": "attribute",
"val": true,
},
Object {
- "col": 16,
- "line": 3,
+ "loc": Object {
+ "end": Object {
+ "column": 17,
+ "line": 3,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 16,
+ "line": 3,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 4,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 4,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 4,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 22,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 4,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "\'foo, bar, baz\'",
},
Object {
- "col": 24,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 29,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 24,
+ "line": 4,
+ },
+ },
"mustEscape": true,
"name": "bar",
"type": "attribute",
"val": "1",
},
Object {
- "col": 29,
- "line": 4,
+ "loc": Object {
+ "end": Object {
+ "column": 30,
+ "line": 4,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 29,
+ "line": 4,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 5,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 5,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 5,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 5,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 5,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "\'((foo))\'",
},
Object {
- "col": 18,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 34,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 18,
+ "line": 5,
+ },
+ },
"mustEscape": true,
"name": "bar",
"type": "attribute",
"val": "(1) ? 1 : 0",
},
Object {
- "col": 35,
- "line": 5,
+ "loc": Object {
+ "end": Object {
+ "column": 36,
+ "line": 5,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 35,
+ "line": 5,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 6,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 6,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 6,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 7,
+ "line": 6,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 6,
+ },
+ },
"type": "tag",
"val": "select",
},
Object {
- "col": 1,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 7,
+ },
+ },
"type": "indent",
"val": 2,
},
Object {
- "col": 3,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 9,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 7,
+ },
+ },
"type": "tag",
"val": "option",
},
Object {
- "col": 9,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 10,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 9,
+ "line": 7,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 10,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 21,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 10,
+ "line": 7,
+ },
+ },
"mustEscape": true,
"name": "value",
"type": "attribute",
"val": "\'foo\'",
},
Object {
- "col": 23,
- "line": 7,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 31,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 23,
+ "line": 7,
+ },
+ },
+ "mustEscape": true,
"name": "selected",
"type": "attribute",
"val": true,
},
Object {
- "col": 31,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 32,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 31,
+ "line": 7,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 33,
- "line": 7,
+ "loc": Object {
+ "end": Object {
+ "column": 36,
+ "line": 7,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 33,
+ "line": 7,
+ },
+ },
"type": "text",
"val": "Foo",
},
Object {
- "col": 1,
- "line": 8,
- "type": "newline",
- },
- Object {
- "col": 3,
- "line": 8,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 8,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 9,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 8,
+ },
+ },
"type": "tag",
"val": "option",
},
Object {
- "col": 9,
- "line": 8,
+ "loc": Object {
+ "end": Object {
+ "column": 10,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 9,
+ "line": 8,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 10,
- "line": 8,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 18,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 10,
+ "line": 8,
+ },
+ },
+ "mustEscape": true,
"name": "selected",
"type": "attribute",
"val": true,
},
Object {
- "col": 20,
- "line": 8,
+ "loc": Object {
+ "end": Object {
+ "column": 31,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 20,
+ "line": 8,
+ },
+ },
"mustEscape": true,
"name": "value",
"type": "attribute",
"val": "\'bar\'",
},
Object {
- "col": 31,
- "line": 8,
+ "loc": Object {
+ "end": Object {
+ "column": 32,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 31,
+ "line": 8,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 33,
- "line": 8,
+ "loc": Object {
+ "end": Object {
+ "column": 36,
+ "line": 8,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 33,
+ "line": 8,
+ },
+ },
"type": "text",
"val": "Bar",
},
Object {
- "col": 1,
- "line": 9,
- "type": "outdent",
- },
- Object {
- "col": 1,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 9,
+ },
+ },
+ "type": "outdent",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 9,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 9,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 15,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 9,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "\"class:\"",
},
Object {
- "col": 15,
- "line": 9,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 9,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 15,
+ "line": 9,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 10,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 10,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 6,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 10,
+ },
+ },
"type": "tag",
"val": "input",
},
Object {
- "col": 6,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 7,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 6,
+ "line": 10,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 7,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 21,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 7,
+ "line": 10,
+ },
+ },
"mustEscape": true,
"name": "pattern",
"type": "attribute",
"val": "\'\\\\S+\'",
},
Object {
- "col": 21,
- "line": 10,
+ "loc": Object {
+ "end": Object {
+ "column": 22,
+ "line": 10,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 21,
+ "line": 10,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 12,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 12,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 12,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 12,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 18,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 12,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/contact\'",
},
Object {
- "col": 18,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 19,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 18,
+ "line": 12,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 20,
- "line": 12,
+ "loc": Object {
+ "end": Object {
+ "column": 27,
+ "line": 12,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 20,
+ "line": 12,
+ },
+ },
"type": "text",
"val": "contact",
},
Object {
- "col": 1,
- "line": 13,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 13,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 13,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 13,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 15,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 13,
+ },
+ },
"mustEscape": true,
"name": "href",
"type": "attribute",
"val": "\'/save\'",
},
Object {
- "col": 15,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 15,
+ "line": 13,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 16,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 23,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 16,
+ "line": 13,
+ },
+ },
"type": "class",
"val": "button",
},
Object {
- "col": 24,
- "line": 13,
+ "loc": Object {
+ "end": Object {
+ "column": 28,
+ "line": 13,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 24,
+ "line": 13,
+ },
+ },
"type": "text",
"val": "save",
},
Object {
- "col": 1,
- "line": 14,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 14,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 14,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 14,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 14,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 14,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 14,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 6,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 14,
+ },
+ },
+ "mustEscape": true,
"name": "foo",
"type": "attribute",
"val": true,
},
Object {
- "col": 7,
- "line": 14,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 10,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 7,
+ "line": 14,
+ },
+ },
+ "mustEscape": true,
"name": "bar",
"type": "attribute",
"val": true,
},
Object {
- "col": 11,
- "line": 14,
- "mustEscape": false,
+ "loc": Object {
+ "end": Object {
+ "column": 14,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 11,
+ "line": 14,
+ },
+ },
+ "mustEscape": true,
"name": "baz",
"type": "attribute",
"val": true,
},
Object {
- "col": 14,
- "line": 14,
+ "loc": Object {
+ "end": Object {
+ "column": 15,
+ "line": 14,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 14,
+ "line": 14,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 15,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 15,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 15,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 15,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 22,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 15,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "\'foo, bar, baz\'",
},
Object {
- "col": 23,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 28,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 23,
+ "line": 15,
+ },
+ },
"mustEscape": true,
"name": "bar",
"type": "attribute",
"val": "1",
},
Object {
- "col": 28,
- "line": 15,
+ "loc": Object {
+ "end": Object {
+ "column": 29,
+ "line": 15,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 28,
+ "line": 15,
+ },
+ },
"type": "end-attributes",
},
Object {
- "col": 1,
- "line": 16,
- "type": "newline",
- },
- Object {
- "col": 1,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 1,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 16,
+ },
+ },
+ "type": "newline",
+ },
+ Object {
+ "loc": Object {
+ "end": Object {
+ "column": 2,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 1,
+ "line": 16,
+ },
+ },
"type": "tag",
"val": "a",
},
Object {
- "col": 2,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 3,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 2,
+ "line": 16,
+ },
+ },
"type": "start-attributes",
},
Object {
- "col": 3,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 16,
+ "line": 16,
+ },
+ "filename": "/packages/pug-lexer/test/cases/attrs.pug",
+ "start": Object {
+ "column": 3,
+ "line": 16,
+ },
+ },
"mustEscape": true,
"name": "foo",
"type": "attribute",
"val": "\'((foo))\'",
},
Object {
- "col": 17,
- "line": 16,
+ "loc": Object {
+ "end": Object {
+ "column": 33,
+ "line": 16,
+ },
+ "filename": "