diff --git a/packages/gatsby-remark-autolink-headers/src/__tests__/__snapshots__/index.js.snap b/packages/gatsby-remark-autolink-headers/src/__tests__/__snapshots__/index.js.snap index 80f26fe056b92..45b4182438a97 100644 --- a/packages/gatsby-remark-autolink-headers/src/__tests__/__snapshots__/index.js.snap +++ b/packages/gatsby-remark-autolink-headers/src/__tests__/__snapshots__/index.js.snap @@ -225,7 +225,6 @@ Object { "data": Object { "hProperties": Object { "id": "heading-uno", - "style": "position:relative;", }, "htmlAttributes": Object { "id": "heading-uno", diff --git a/packages/gatsby-remark-autolink-headers/src/index.js b/packages/gatsby-remark-autolink-headers/src/index.js index b15ade2ced198..8389184e303ad 100644 --- a/packages/gatsby-remark-autolink-headers/src/index.js +++ b/packages/gatsby-remark-autolink-headers/src/index.js @@ -60,9 +60,9 @@ module.exports = ( patch(data, `hProperties`, {}) patch(data.htmlAttributes, `id`, id) patch(data.hProperties, `id`, id) - patch(data.hProperties, `style`, `position:relative;`) if (icon !== false) { + patch(data.hProperties, `style`, `position:relative;`) const label = id.split(`-`).join(` `) const method = isIconAfterHeader ? `push` : `unshift` node.children[method]({