Socket
Socket
Sign inDemoInstall

@antora/asciidoc-loader

Package Overview
Dependencies
56
Maintainers
2
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.4 to 3.1.5

3

lib/image/convert-image-ref.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc