@antora/navigation-builder
Advanced tools
Comparing version 2.0.1 to 2.1.0-rc.1
@@ -82,7 +82,3 @@ 'use strict' | ||
const entry = formattedContent ? partitionContent(formattedContent) : {} | ||
if (items.length) { | ||
entry.items = items.map((item) => buildNavigationTree(item.getText(), getChildListItems(item))) | ||
} | ||
if (items.length) entry.items = items.map((item) => buildNavigationTree(item.getText(), getChildListItems(item))) | ||
return entry | ||
@@ -97,6 +93,11 @@ } | ||
const [, url, role, content] = match | ||
if (role === 'page') { | ||
let roles | ||
if (role && (roles = role.includes(' ') ? role.split(' ') : [role]).includes('page')) { | ||
const hashIdx = url.indexOf('#') | ||
if (~hashIdx) { | ||
return { content, url, urlType: 'internal', hash: url.substr(hashIdx) } | ||
if (roles.includes('unresolved')) { | ||
return { content, url, urlType: 'internal', unresolved: true } | ||
} else { | ||
return { content, url, urlType: 'internal', hash: url.substr(hashIdx) } | ||
} | ||
} else { | ||
@@ -103,0 +104,0 @@ return { content, url, urlType: 'internal' } |
{ | ||
"name": "@antora/navigation-builder", | ||
"version": "2.0.1", | ||
"version": "2.1.0-rc.1", | ||
"description": "Builds a navigation catalog from navigation files for adding site navigation to pages in an Antora documentation pipeline.", | ||
@@ -18,3 +18,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/asciidoc-loader": "2.0.1" | ||
"@antora/asciidoc-loader": "2.1.0-rc.1" | ||
}, | ||
@@ -21,0 +21,0 @@ "engines": { |
@@ -11,4 +11,4 @@ # Antora Navigation Builder | ||
Copyright (C) 2017-2018 [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). | ||
Copyright (C) 2017-2019 [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org). | ||
Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0). |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
7078
137
1
+ Added@antora/asciidoc-loader@2.1.0-rc.1(transitive)
- Removed@antora/asciidoc-loader@2.0.1(transitive)