@hashicorp/remark-plugins
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "@hashicorp/remark-plugins", | ||
"description": "A potpourri of remark plugins used to process .mdx files", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"author": "Jeff Escalante", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/hashicorp/remark-plugins/issues", |
@@ -9,2 +9,6 @@ const generateSlug = require('../../generate_slug') | ||
// code blocks. | ||
// | ||
// NOTE: Some of the HTML code is duplicated in: | ||
// https://github.com/hashicorp/consul/blob/4f15f83dc64e2a9a95cb6b989719838b1f97015b/website/components/config-entry-reference/index.jsx#L84-L105 | ||
// If updating the HTML code here, also update there. | ||
module.exports = function anchorLinksPlugin({ | ||
@@ -11,0 +15,0 @@ compatibilitySlug, |
@@ -16,3 +16,5 @@ const visit = require('unist-util-visit') | ||
const customMap = options.map || {} | ||
return customMap[elemKey] || defaultMap[elemKey] | ||
return typeof customMap[elemKey] === 'string' | ||
? customMap[elemKey] | ||
: defaultMap[elemKey] | ||
} | ||
@@ -19,0 +21,0 @@ |
38224
496