From 795b908095b29e76435479879c1ade7ef759ce7b Mon Sep 17 00:00:00 2001 From: Raymond Muller Date: Thu, 12 Oct 2017 15:50:40 +0200 Subject: [PATCH] feat: support RegExp in ignoredElements (#6769) --- src/core/vdom/patch.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/vdom/patch.js b/src/core/vdom/patch.js index f41f5a90..7cbe44bb 100644 --- a/src/core/vdom/patch.js +++ b/src/core/vdom/patch.js @@ -120,7 +120,14 @@ export function createPatchFunction (backend) { if ( !inPre && !vnode.ns && - !(config.ignoredElements.length && config.ignoredElements.indexOf(tag) > -1) && + !( + config.ignoredElements.length && + config.ignoredElements.some(ignore => { + return ignore instanceof RegExp + ? ignore.test(tag) + : ignore === tag + }) + ) && config.isUnknownElement(tag) ) { warn(