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.8 to 3.0.0-alpha.9

6

lib/create-extension-registry.js

@@ -13,3 +13,3 @@ 'use strict'

*
* @param {Asciidoctor} asciidoctor - Asciidoctor API.
* @param {Asciidoctor} Asciidoctor - Asciidoctor API.
* @param {Object} callbacks - Callback functions.

@@ -20,4 +20,4 @@ * @param {Function} callbacks.onInclude - A function that resolves the target of an include.

*/
function createExtensionRegistry (asciidoctor, callbacks) {
const registry = asciidoctor.Extensions.create()
function createExtensionRegistry (Asciidoctor, callbacks) {
const registry = Asciidoctor.Extensions.create()
registry.includeProcessor(IncludeProcessor.$new(callbacks.onInclude))

@@ -24,0 +24,0 @@ return registry

'use strict'
const asciidoctor = require('@asciidoctor/core')()
const Asciidoctor = require('@asciidoctor/core')()
const { Extensions, LoggerManager, NullLogger } = Asciidoctor
const Opal = global.Opal
const Extensions = asciidoctor.Extensions
const createConverter = require('./converter/create')

@@ -57,3 +57,3 @@ const createExtensionRegistry = require('./create-extension-registry')

)
const extensionRegistry = createExtensionRegistry(asciidoctor, {
const extensionRegistry = createExtensionRegistry(Asciidoctor, {
onInclude: contentCatalog

@@ -64,5 +64,5 @@ ? (doc, target, cursor) => resolveIncludeFile(target, file, cursor, contentCatalog)

const extensions = config.extensions || []
LoggerManager.setLogger(LoggerAdapter.logger.noop ? NullLogger.$new() : LoggerAdapter.$new(file.src))
if (extensions.length) extensions.forEach((ext) => ext.register(extensionRegistry, { file, contentCatalog, config }))
const loggerAdapter = LoggerAdapter.logger.noop ? false : LoggerAdapter.$new(file.src)
const opts = { attributes, extension_registry: extensionRegistry, safe: 'safe', logger: loggerAdapter }
const opts = { attributes, extension_registry: extensionRegistry, safe: 'safe' }
if (config.doctype) opts.doctype = config.doctype

@@ -83,3 +83,3 @@ if (config.sourcemap) opts.sourcemap = true

}
const doc = asciidoctor.load(contents.toString(), opts)
const doc = Asciidoctor.load(contents.toString(), opts)
if (extensions.length) freeExtensions()

@@ -86,0 +86,0 @@ return doc

@@ -33,4 +33,4 @@ 'use strict'

const delegate = logger.unwrap()
this.level = severityMap.get(delegate.level) || severityMap.get('info')
this.failureLevel = severityMap.get(delegate.failureLevel) || Infinity
if ((this.level = severityMap.get(delegate.level)) == null) this.level = severityMap.get('info')
if ((this.failureLevel = severityMap.get(delegate.failureLevel)) == null) this.failureLevel = Infinity
this.context = context

@@ -37,0 +37,0 @@ this.delegate = delegate

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

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

"dependencies": {
"@antora/logger": "3.0.0-alpha.8",
"@antora/logger": "3.0.0-alpha.9",
"@antora/user-require-helper": "~2.0",

@@ -40,3 +40,3 @@ "@asciidoctor/core": "~2.2"

],
"gitHead": "2e5695bea11fb5719989c329c97e66d36e29659f"
"gitHead": "a504d6889819b548e8a5416a7194cbb6f9a93e93"
}
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