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

2

lib/index.js

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

*
* Uses Asciidoctor.js to loads AsciiDoc content in a way that integrates with
* Uses Asciidoctor.js to load AsciiDoc content in a way that integrates with
* the Antora environment. In particular, it resolves include files and page

@@ -9,0 +9,0 @@ * references from Antora's virtual content catalog.

'use strict'
const computeRelativeUrlPath = require('../util/compute-relative-url-path')
const resolvePage = require('./resolve-page')
const splitOnce = require('../util/split-once')

@@ -20,11 +19,11 @@

* @param {File} currentPage - The virtual file for the current page.
* @param {ContentCatalog} catalog - The content catalog that contains the virtual files in the site.
* @param {ContentCatalog} contentCatalog - The content catalog that contains the virtual files in the site.
* @param {Boolean} [relativize=true] - Compute the target relative to the current page.
* @returns {Object} A map ({ content, target }) with the resolved content and target to make an HTML link.
*/
function convertPageRef (refSpec, content, currentPage, catalog, relativize = true) {
function convertPageRef (refSpec, content, currentPage, contentCatalog, relativize = true) {
let targetPage
const [pageIdSpec, fragment] = splitOnce(refSpec, '#')
try {
if (!(targetPage = resolvePage(pageIdSpec, catalog, currentPage.src))) {
if (!(targetPage = contentCatalog.resolvePage(pageIdSpec, currentPage.src))) {
// TODO log "Unresolved page ID"

@@ -31,0 +30,0 @@ return { content: `${pageIdSpec}.adoc${fragment ? '#' + fragment : ''}`, target: '#' }

{
"name": "@antora/asciidoc-loader",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"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",

# Antora AsciiDoc Loader
The AsciiDoc loader is a reusable library for handling AsciiDoc content in Antora.
The AsciiDoc Loader is a reusable library for handling AsciiDoc content in Antora.
It loads AsciiDoc content into an AsciiDoc Document object (AST) for use in an Antora documentation pipeline.
The AsciiDoc loader wraps [Asciidoctor.js](https://asciidoctor.org/docs/asciidoctor.js/), adding several extensions that enable AsciiDoc to work in an Antora environment.
The AsciiDoc loader wraps [Asciidoctor.js](https://asciidoctor.org/docs/asciidoctor.js/) and adds several extensions that enable AsciiDoc to work in an Antora environment.
These extensions include:

@@ -8,0 +8,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