gatsby-remark-autolink-headers
Advanced tools
Comparing version 1.5.0-alpha.93f2e2a2 to 1.5.0-alpha.a0a09c94
"use strict"; | ||
var scrollToHash = function scrollToHash(offsetY) { | ||
// Make sure React has had a change to flush to DOM first. | ||
// Make sure React has had a chance to flush to DOM first. | ||
setTimeout(function () { | ||
var hash = window.location.hash.replace("#", ""); | ||
var hash = window.decodeURI(window.location.hash.replace("#", "")); | ||
if (hash !== "") { | ||
@@ -8,0 +8,0 @@ var element = document.getElementById(hash); |
@@ -19,3 +19,3 @@ "use strict"; | ||
var script = "\n document.addEventListener(\"DOMContentLoaded\", function(event) {\n var hash = location.hash.replace('#', '')\n if (hash !== '') {\n var element = document.getElementById(hash)\n if (element) {\n var offset = element.offsetTop\n // Wait for the browser to finish rendering before scrolling.\n setTimeout((function() {\n window.scrollTo(0, offset - " + offsetY + ")\n }), 0)\n }\n }\n })\n "; | ||
var script = "\n document.addEventListener(\"DOMContentLoaded\", function(event) {\n var hash = window.decodeURI(location.hash.replace('#', ''))\n if (hash !== '') {\n var element = document.getElementById(hash)\n if (element) {\n var offset = element.offsetTop\n // Wait for the browser to finish rendering before scrolling.\n setTimeout((function() {\n window.scrollTo(0, offset - " + offsetY + ")\n }), 0)\n }\n }\n })\n "; | ||
@@ -22,0 +22,0 @@ return setHeadComponents([_react2.default.createElement( |
{ | ||
"name": "gatsby-remark-autolink-headers", | ||
"description": "Gatsby plugin to autolink headers in markdown processed by Remark", | ||
"version": "1.5.0-alpha.93f2e2a2", | ||
"version": "1.5.0-alpha.a0a09c94", | ||
"author": "Kyle Mathews <mathews.kyle@gmail.com>", | ||
@@ -6,0 +6,0 @@ "dependencies": { |
# gatsby-remark-autolink-headers | ||
Adds Github-style links to `MarkdownRemark` headers. | ||
Adds GitHub-style links to `MarkdownRemark` headers. | ||
@@ -17,8 +17,6 @@ ## Install | ||
options: { | ||
plugins: [ | ||
`gatsby-remark-autolink-headers`, | ||
] | ||
} | ||
} | ||
] | ||
plugins: [`gatsby-remark-autolink-headers`], | ||
}, | ||
}, | ||
]; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5372
6
22