Socket
Socket
Sign inDemoInstall

@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 2.0.0-rc.3 to 2.0.0

1

lib/constants.js
'use strict'
module.exports = Object.freeze({
$Antora () {},
EXAMPLES_DIR_TOKEN: 'example$',
PARTIALS_DIR_TOKEN: 'partial$',
})

3

lib/converter/html5.js
'use strict'
const Opal = global.Opal
const { $Antora } = require('../constants')
const $pageRefCallback = Symbol('callback')

@@ -8,3 +9,3 @@

const scope = Opal.klass(
Opal.module(null, 'Antora', function $Antora () {}),
Opal.module(null, 'Antora', $Antora),
Opal.module(null, 'Asciidoctor').Converter.Html5Converter,

@@ -11,0 +12,0 @@ 'Html5Converter',

'use strict'
const Opal = global.Opal
const { $Antora } = require('../constants')

@@ -14,8 +15,3 @@ const DBL_COLON = '::'

const superclass = Opal.module(null, 'Asciidoctor').Extensions.IncludeProcessor
const scope = Opal.klass(
Opal.module(null, 'Antora', function $Antora () {}),
superclass,
'IncludeProcessor',
function () {}
)
const scope = Opal.klass(Opal.module(null, 'Antora', $Antora), superclass, 'IncludeProcessor', function () {})

@@ -47,5 +43,6 @@ Opal.defn(scope, '$initialize', function initialize (callback) {

reader.pushInclude(includeContents, resolvedFile.file, resolvedFile.path, startLineNum, attrs)
if (resolvedFile.context) {
;(reader.file = new String(reader.file)).context = resolvedFile.context // eslint-disable-line no-new-wrappers
}
;(reader.file = new String(reader.file)).context = resolvedFile.context // eslint-disable-line no-new-wrappers
} else {
log('error', `include target not found: ${target}`, reader)
reader.$unshift(`Unresolved include directive in ${reader.getCursor().file} - include::${target}[]`)
}

@@ -52,0 +49,0 @@ })

@@ -26,3 +26,2 @@ 'use strict'

let relative
let placeholder
if (RESOURCE_ID_DETECTOR_RX.test(target)) {

@@ -32,6 +31,3 @@ // NOTE support legacy {partialsdir} and {examplesdir} prefixes (same as resource ID w/ only family and relative)

;[family, relative] = splitOnce(target, '$')
if (relative.charAt() === '/') {
relative = relative.substr(1)
placeholder = true
}
if (relative.charAt() === '/') relative = relative.substr(1)
resolved = catalog.getById({

@@ -66,10 +62,2 @@ component: ctx.component,

}
} else {
// FIXME use replace next line instead of pushing an include; maybe raise error
// TODO log "Unresolved include"
return {
context: cursor.dir.context,
file: cursor.file,
contents: `+include::${placeholder ? '{' + family + 'sdir}/' + relative : target}[]+`,
}
}

@@ -76,0 +64,0 @@ }

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

@@ -5,0 +5,0 @@ "license": "MPL-2.0",

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