Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antora/asciidoc-loader

Package Overview
Dependencies
Maintainers
2
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/asciidoc-loader - npm Package Compare versions

Comparing version 3.0.0-alpha.3 to 3.0.0-alpha.4

15

lib/converter/html5.js

@@ -23,7 +23,13 @@ 'use strict'

let callback
let refSpec = node.getAttribute('path', undefined, false)
let refSpec =
node.getAttribute('path', undefined, false) ||
// NOTE detect and convert self reference into a page reference
(node.target === '#' &&
node.getText() == null &&
node.getAttribute('refid', undefined, false) == null &&
node.getDocument().getAttribute('page-relative-src-path'))
if (refSpec && (callback = this[$pageRefCallback])) {
const attrs = node.getAttributes()
const fragment = attrs.fragment
if (fragment && fragment !== Opal.nil) refSpec += '#' + fragment
if (fragment) refSpec += '#' + fragment
const { content, target, internal, unresolved } = callback(refSpec, node.getText())

@@ -33,5 +39,4 @@ let type

type = 'xref'
delete attrs.path
delete attrs.fragment
attrs.refid = fragment // or target.substr(1)
attrs.path = undefined
attrs.fragment = attrs.refid = fragment
} else {

@@ -38,0 +43,0 @@ type = 'link'

'use strict'
// IMPORTANT eagerly load Opal to force the String encoding from UTF-16LE to UTF-8
const Opal = require('asciidoctor-opal-runtime').Opal
if ('encoding' in String.prototype && String(String.prototype.encoding) !== 'UTF-8') {
String.prototype.encoding = Opal.const_get_local(Opal.const_get_qualified('::', 'Encoding'), 'UTF_8') // eslint-disable-line no-extend-native
}
const asciidoctor = require('@asciidoctor/core')()
const Opal = global.Opal
const Extensions = asciidoctor.Extensions

@@ -121,3 +116,3 @@ const convertImageRef = require('./image/convert-image-ref')

if (origin.worktree) {
attrs['page-origin-worktree'] = ''
attrs['page-origin-worktree'] = origin.worktree
attrs['page-origin-refhash'] = '(worktree)'

@@ -124,0 +119,0 @@ } else {

{
"name": "@antora/asciidoc-loader",
"version": "3.0.0-alpha.3",
"version": "3.0.0-alpha.4",
"description": "Loads AsciiDoc content into an Asciidoctor Document object (AST) for use in an Antora documentation pipeline.",

@@ -20,4 +20,3 @@ "license": "MPL-2.0",

"dependencies": {
"@asciidoctor/core": "~2.2.0",
"asciidoctor-opal-runtime": "0.3.2"
"@asciidoctor/core": "~2.2"
},

@@ -39,3 +38,3 @@ "engines": {

],
"gitHead": "2f02cf0d42fb5db4607ea5e600ca8a4ab45d5a5f"
"gitHead": "aaa76a6387e339052d0bfb298add24f56f42a828"
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc