From 43c0390ea0b26a6fa7561d5cadb08115e1591233 Mon Sep 17 00:00:00 2001 From: Pedr Browne Date: Mon, 7 May 2018 11:22:39 +0100 Subject: [PATCH] flag importance of plugin order for prism-js vs embed-snippet If gatsby-remark-prism-js is declared before gatsby-remark-embed-snippet, the latter will not pick up the `embed:example.js` syntax because it is looking for an inline-code node and it will have been transformed into a p node by gatsby-remark-prism-js. This needs to be noted as this is far from obvious. --- packages/gatsby-remark-embed-snippet/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/gatsby-remark-embed-snippet/README.md b/packages/gatsby-remark-embed-snippet/README.md index 6f0d13a3760df..3b90099288fb9 100644 --- a/packages/gatsby-remark-embed-snippet/README.md +++ b/packages/gatsby-remark-embed-snippet/README.md @@ -116,6 +116,8 @@ quz: "highlighted" ## How to use +Important: This module must appear before `gatsby-remark-prismjs` in your plugins array, or the markup will have already been transformed into a code block and this plugin will fail to detect it and inline the file. + ```javascript // In your gatsby-config.js module.exports = {