build: build 2.6.0-beta.3

This commit is contained in:
Evan You 2019-01-30 09:59:32 -05:00
parent 2afa1d056e
commit 9f3cbafa55
19 changed files with 221 additions and 85 deletions

View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5319,7 +5319,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */
@ -9089,6 +9089,7 @@ var isNonPhrasingTag = makeMap(
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -9266,7 +9267,7 @@ function parseHTML (html, options) {
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -9395,6 +9396,8 @@ var slotRE = /^v-slot(:|$)|^#/;
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE$1 = /\s+/g; var whitespaceRE$1 = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -9551,6 +9554,7 @@ function parse (
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
@ -9558,6 +9562,19 @@ function parse (
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$2(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5352,7 +5352,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */
@ -9108,6 +9108,7 @@ const isNonPhrasingTag = makeMap(
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
const attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; const attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
const dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
const ncname = `[a-zA-Z_][\\-\\.0-9_a-zA-Z${unicodeLetters}]*`; const ncname = `[a-zA-Z_][\\-\\.0-9_a-zA-Z${unicodeLetters}]*`;
const qnameCapture = `((?:${ncname}\\:)?${ncname})`; const qnameCapture = `((?:${ncname}\\:)?${ncname})`;
const startTagOpen = new RegExp(`^<${qnameCapture}`); const startTagOpen = new RegExp(`^<${qnameCapture}`);
@ -9285,7 +9286,7 @@ function parseHTML (html, options) {
}; };
advance(start[0].length); advance(start[0].length);
let end, attr; let end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -9414,6 +9415,8 @@ const slotRE = /^v-slot(:|$)|^#/;
const lineBreakRE = /[\r\n]/; const lineBreakRE = /[\r\n]/;
const whitespaceRE$1 = /\s+/g; const whitespaceRE$1 = /\s+/g;
const invalidAttributeRE = /[\s"'<>\/=]/;
const decodeHTMLCached = cached(he.decode); const decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -9570,6 +9573,7 @@ function parse (
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start; element.start = start;
element.rawAttrsMap = element.attrsList.reduce((cumulated, attr) => { element.rawAttrsMap = element.attrsList.reduce((cumulated, attr) => {
@ -9577,6 +9581,19 @@ function parse (
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(attr => {
if (invalidAttributeRE.test(attr.name)) {
warn$2(
`Invalid dynamic argument expression: attribute names cannot contain ` +
`spaces, quotes, <, >, / or =.`,
{
start: attr.start + attr.name.indexOf(`[`),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

File diff suppressed because one or more lines are too long

27
dist/vue.esm.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5339,7 +5339,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */
@ -9117,6 +9117,7 @@ var isNonPhrasingTag = makeMap(
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -9294,7 +9295,7 @@ function parseHTML (html, options) {
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -9424,6 +9425,8 @@ var slotRE = /^v-slot(:|$)|^#/;
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE$1 = /\s+/g; var whitespaceRE$1 = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -9580,13 +9583,27 @@ function parse (
element.ns = ns; element.ns = ns;
} }
if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) { if (process.env.NODE_ENV !== 'production') {
if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
cumulated[attr.name] = attr; cumulated[attr.name] = attr;
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$2(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;
@ -9976,7 +9993,7 @@ function processSlotContent (el) {
} }
// 2.6 v-slot syntax // 2.6 v-slot syntax
if (process.env.NEW_SLOT_SYNTAX) { {
if (el.tag === 'template') { if (el.tag === 'template') {
// v-slot on <template> // v-slot on <template>
var slotBinding = getAndRemoveAttrByRegex(el, slotRE); var slotBinding = getAndRemoveAttrByRegex(el, slotRE);

23
dist/vue.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5323,7 +5323,7 @@
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */
@ -9093,6 +9093,7 @@
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -9270,7 +9271,7 @@
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -9399,6 +9400,8 @@
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE$1 = /\s+/g; var whitespaceRE$1 = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -9555,6 +9558,7 @@
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
@ -9562,6 +9566,19 @@
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$2(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

4
dist/vue.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5310,7 +5310,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5330,7 +5330,7 @@ Object.defineProperty(Vue, 'FunctionalRenderContext', {
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */

4
dist/vue.runtime.js vendored
View File

@ -1,5 +1,5 @@
/*! /*!
* Vue.js v2.6.0-beta.2 * Vue.js v2.6.0-beta.3
* (c) 2014-2019 Evan You * (c) 2014-2019 Evan You
* Released under the MIT License. * Released under the MIT License.
*/ */
@ -5314,7 +5314,7 @@
value: FunctionalRenderContext value: FunctionalRenderContext
}); });
Vue.version = '2.6.0-beta.2'; Vue.version = '2.6.0-beta.3';
/* */ /* */

File diff suppressed because one or more lines are too long

View File

@ -3344,6 +3344,7 @@
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -3521,7 +3522,7 @@
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -3798,6 +3799,8 @@
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE = /\s+/g; var whitespaceRE = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -3954,6 +3957,7 @@
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
@ -3961,6 +3965,19 @@
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$1(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

View File

@ -3094,6 +3094,7 @@ var style = {
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -3271,7 +3272,7 @@ function parseHTML (html, options) {
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -3548,6 +3549,8 @@ var slotRE = /^v-slot(:|$)|^#/;
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE = /\s+/g; var whitespaceRE = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -3704,6 +3707,7 @@ function parse (
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
@ -3711,6 +3715,19 @@ function parse (
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$1(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-server-renderer", "name": "vue-server-renderer",
"version": "2.6.0-beta.2", "version": "2.6.0-beta.3",
"description": "server renderer for Vue 2.0", "description": "server renderer for Vue 2.0",
"main": "index.js", "main": "index.js",
"types": "types/index.d.ts", "types": "types/index.d.ts",

View File

@ -303,6 +303,7 @@
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -480,7 +481,7 @@
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -2740,6 +2741,8 @@
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE = /\s+/g; var whitespaceRE = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -2896,6 +2899,7 @@
element.ns = ns; element.ns = ns;
} }
{
if (options.outputSourceRange) { if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
@ -2903,6 +2907,19 @@
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$1(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;

View File

@ -260,6 +260,7 @@ function def (obj, key, val, enumerable) {
// Regular Expressions for parsing tags and attributes // Regular Expressions for parsing tags and attributes
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var dynamicArgAttribute = /^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*"; var ncname = "[a-zA-Z_][\\-\\.0-9_a-zA-Z" + unicodeLetters + "]*";
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
var startTagOpen = new RegExp(("^<" + qnameCapture)); var startTagOpen = new RegExp(("^<" + qnameCapture));
@ -437,7 +438,7 @@ function parseHTML (html, options) {
}; };
advance(start[0].length); advance(start[0].length);
var end, attr; var end, attr;
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { while (!(end = html.match(startTagClose)) && (attr = html.match(dynamicArgAttribute) || html.match(attribute))) {
attr.start = index; attr.start = index;
advance(attr[0].length); advance(attr[0].length);
attr.end = index; attr.end = index;
@ -2360,6 +2361,8 @@ var slotRE = /^v-slot(:|$)|^#/;
var lineBreakRE = /[\r\n]/; var lineBreakRE = /[\r\n]/;
var whitespaceRE = /\s+/g; var whitespaceRE = /\s+/g;
var invalidAttributeRE = /[\s"'<>\/=]/;
var decodeHTMLCached = cached(he.decode); var decodeHTMLCached = cached(he.decode);
// configurable state // configurable state
@ -2516,13 +2519,27 @@ function parse (
element.ns = ns; element.ns = ns;
} }
if (process.env.NODE_ENV !== 'production' && options.outputSourceRange) { if (process.env.NODE_ENV !== 'production') {
if (options.outputSourceRange) {
element.start = start$1; element.start = start$1;
element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) { element.rawAttrsMap = element.attrsList.reduce(function (cumulated, attr) {
cumulated[attr.name] = attr; cumulated[attr.name] = attr;
return cumulated return cumulated
}, {}); }, {});
} }
attrs.forEach(function (attr) {
if (invalidAttributeRE.test(attr.name)) {
warn$1(
"Invalid dynamic argument expression: attribute names cannot contain " +
"spaces, quotes, <, >, / or =.",
{
start: attr.start + attr.name.indexOf("["),
end: attr.start + attr.name.length
}
);
}
});
}
if (isForbiddenTag(element) && !isServerRendering()) { if (isForbiddenTag(element) && !isServerRendering()) {
element.forbidden = true; element.forbidden = true;
@ -2912,7 +2929,7 @@ function processSlotContent (el) {
} }
// 2.6 v-slot syntax // 2.6 v-slot syntax
if (process.env.NEW_SLOT_SYNTAX) { {
if (el.tag === 'template') { if (el.tag === 'template') {
// v-slot on <template> // v-slot on <template>
var slotBinding = getAndRemoveAttrByRegex(el, slotRE); var slotBinding = getAndRemoveAttrByRegex(el, slotRE);

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-template-compiler", "name": "vue-template-compiler",
"version": "2.6.0-beta.2", "version": "2.6.0-beta.3",
"description": "template compiler for Vue 2.0", "description": "template compiler for Vue 2.0",
"main": "index.js", "main": "index.js",
"unpkg": "browser.js", "unpkg": "browser.js",