@antora/asciidoc-loader
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -7,5 +7,6 @@ 'use strict' | ||
const image = contentCatalog.resolveResource(resourceSpec, currentPage.src, 'image', ['image']) | ||
if (image) return computeRelativeUrlPath(currentPage.pub.url, image.pub.url) | ||
// technically, this should check for out instead of pub, but these properties are expected to be set together | ||
if (image && image.pub) return computeRelativeUrlPath(currentPage.pub.url, image.pub.url) | ||
} | ||
module.exports = convertImageRef |
@@ -9,4 +9,3 @@ 'use strict' | ||
* This function takes into account directory index URLs and extensionless | ||
* URLs. It assumes it's working with root-relative URLs, not qualified URLs | ||
* with potentially different hosts. | ||
* URLs. It assumes it's working with root-relative URLs, not absolute URLs. | ||
* | ||
@@ -22,9 +21,6 @@ * @memberof asciidoc-loader | ||
function computeRelativeUrlPath (from, to, hash = '') { | ||
if (to.charAt() === '/') { | ||
return to === from | ||
? hash || (isDir(to) ? './' : path.basename(to)) | ||
: (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/' + hash : hash) | ||
} else { | ||
return to + hash | ||
} | ||
if (to.charAt() !== '/') return to + hash | ||
if (to === from) return hash || (isDir(to) ? './' : path.basename(to)) | ||
const rel = path.relative(path.dirname(from + '.'), to) | ||
return rel ? (isDir(to) ? rel + '/' : rel) + hash : (isDir(to) ? './' : '../' + path.basename(to)) + hash | ||
} | ||
@@ -31,0 +27,0 @@ |
{ | ||
"name": "@antora/asciidoc-loader", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "Loads AsciiDoc content into an Asciidoctor Document object (AST) for use in an Antora documentation pipeline.", | ||
@@ -27,3 +27,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/logger": "3.1.4", | ||
"@antora/logger": "3.1.5", | ||
"@antora/user-require-helper": "~2.0", | ||
@@ -30,0 +30,0 @@ "@asciidoctor/core": "~2.2" |
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
41649
936
+ Added@antora/logger@3.1.5(transitive)
- Removed@antora/logger@3.1.4(transitive)
Updated@antora/logger@3.1.5