diff --git a/package.json b/package.json index b50df0a5acf..65c54dcd34e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@newrelic/gatsby-theme-newrelic": "^1.32.1", "@splitsoftware/splitio-react": "^1.2.0", "babel-jest": "^26.3.0", + "common-tags": "^1.8.0", "date-fns": "^2.16.1", "front-matter": "^4.0.2", "gatsby": "^2.32.0", @@ -26,6 +27,7 @@ "gatsby-remark-autolink-headers": "^2.7.0", "gatsby-remark-copy-linked-files": "^2.6.0", "gatsby-remark-images": "^3.11.0", + "gatsby-remark-responsive-iframe": "^2.11.0", "gatsby-source-filesystem": "^2.7.0", "gatsby-transformer-json": "^2.9.0", "gatsby-transformer-remark": "^2.12.0", diff --git a/plugins/gatsby-remark-videos/index.js b/plugins/gatsby-remark-videos/index.js index 4c6222ebea3..87071560de1 100644 --- a/plugins/gatsby-remark-videos/index.js +++ b/plugins/gatsby-remark-videos/index.js @@ -1,5 +1,6 @@ const visit = require('unist-util-visit'); const { parse } = require('node-html-parser'); +const { oneLine } = require('common-tags'); module.exports = ({ markdownAST }) => { visit(markdownAST, 'html', (node) => { @@ -13,14 +14,17 @@ module.exports = ({ markdownAST }) => { const src = element.getAttribute('src'); const title = element.getAttribute('title'); - node.value = ` -