@rsuite/document-nav
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -198,3 +198,4 @@ 'use strict'; | ||
var _title = node.innerText || ''; | ||
node.id = _title; | ||
var _anchor = node.id || _title; | ||
node.id = _anchor; | ||
@@ -209,6 +210,6 @@ var _level = parseInt(type.replace('H', ''), 10); | ||
title: _title, | ||
anchor: _title, | ||
anchor: _anchor, | ||
level: _level | ||
}); | ||
anchors.push(_title); | ||
anchors.push(_anchor); | ||
} | ||
@@ -215,0 +216,0 @@ } else { |
{ | ||
"name": "@rsuite/document-nav", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Document navigation is automatically generated based on the HTML title (h1-h6) tag", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -181,3 +181,4 @@ // @flow | ||
const title = node.innerText || ''; | ||
node.id = title; | ||
const anchor = node.id || title; | ||
node.id = anchor; | ||
@@ -189,6 +190,6 @@ let level = parseInt(type.replace('H', ''), 10); | ||
title, | ||
anchor: title, | ||
anchor, | ||
level | ||
}); | ||
anchors.push(title); | ||
anchors.push(anchor); | ||
} | ||
@@ -195,0 +196,0 @@ } else { |
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
51346
1165