From 1d228010a8b7caacf02da21c3b4e6ce007e0c865 Mon Sep 17 00:00:00 2001 From: Beto Garcia Date: Mon, 19 Apr 2021 15:52:41 -0300 Subject: [PATCH 1/2] Added new AMP-STORY tags --- lib/tags.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tags.js b/lib/tags.js index d752c760..48921bf0 100644 --- a/lib/tags.js +++ b/lib/tags.js @@ -103,7 +103,12 @@ function getTags (modifiers = {}) { 'amp-springboard-player': { version: '0.1' }, 'amp-sticky-ad': { version: '1.0' }, 'amp-story': { version: '1.0' }, + 'amp-story-360': { version: '0.1' }, 'amp-story-auto-ads': { version: '0.1' }, + 'amp-story-auto-analytics': { version: '0.1' }, + 'amp-story-interactive': { version: '0.1' }, + 'amp-story-panning-media': { version: '0.1' }, + 'amp-story-player': { version: '0.1' }, 'amp-subscriptions': { version: '0.1' }, 'amp-subscriptions-google': { version: '0.1' }, 'amp-timeago': { version: '0.1' }, From 26b1e7830705c2fbc4ddc28d5bfde9ea76298c23 Mon Sep 17 00:00:00 2001 From: Beto Garcia Date: Mon, 19 Apr 2021 16:06:46 -0300 Subject: [PATCH 2/2] Add space on Regex of html includes Added Space to only include the exact composite name tag Ex: Add amp-story-player and not the amp-story --- lib/tags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tags.js b/lib/tags.js index 48921bf0..e450b1ec 100644 --- a/lib/tags.js +++ b/lib/tags.js @@ -145,7 +145,7 @@ function filterTag (html, tag, { isTemplate, regex }) { if (regex) { return html.search(regex) > -1 } - return html.includes(`<${tag}`) + return html.includes(`<${tag} `) } function generateScript (cdnBase, tag, { isTemplate, script, version }) {