@antora/html-single-extension 1.0.0-rc.7 → 1.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/converter.js +9 -5
- package/package.json +2 -2
package/lib/converter.js
CHANGED
|
@@ -9,27 +9,31 @@ const PACKAGE_NAME = require('../package.json').name
|
|
|
9
9
|
async function convert (file, conversionAttributes, buildConfig, { logCommand, runCommand }) {
|
|
10
10
|
if (buildConfig.command === false) {
|
|
11
11
|
const Asciidoctor = this.require('@asciidoctor/core')()
|
|
12
|
-
const
|
|
12
|
+
const originalLogger = Asciidoctor.LoggerManager.getLogger()
|
|
13
13
|
const exts = this.getVariables().siteAsciiDocConfig?.extensions || []
|
|
14
14
|
let extRegistry, extDslTypes
|
|
15
15
|
try {
|
|
16
16
|
if (exts.length) {
|
|
17
17
|
const contentCatalog = this.getVariables().contentCatalog
|
|
18
|
-
extDslTypes = Extensions.$constants(false).filter((name) => name.endsWith('Dsl'))
|
|
19
|
-
extRegistry = Extensions.create()
|
|
18
|
+
extDslTypes = Asciidoctor.Extensions.$constants(false).filter((name) => name.endsWith('Dsl'))
|
|
19
|
+
extRegistry = Asciidoctor.Extensions.create()
|
|
20
20
|
exts.forEach((ext) => ext.register(extRegistry, { file, contentCatalog }))
|
|
21
21
|
}
|
|
22
22
|
Asciidoctor.convert(file.contents, {
|
|
23
23
|
attributes: conversionAttributes,
|
|
24
24
|
extension_registry: extRegistry,
|
|
25
|
+
logger: this.getFunctions()
|
|
26
|
+
.loadAsciiDoc({ contents: Buffer.alloc(0), src: file.src })
|
|
27
|
+
.getLogger(),
|
|
25
28
|
mkdirs: true,
|
|
26
|
-
safe: '
|
|
29
|
+
safe: 'unsafe',
|
|
27
30
|
sourcemap: true,
|
|
28
31
|
to_file: conversionAttributes.outfile,
|
|
29
32
|
})
|
|
30
33
|
} finally {
|
|
34
|
+
Asciidoctor.LoggerManager.setLogger(originalLogger)
|
|
31
35
|
if (exts.length) {
|
|
32
|
-
for (const type of extDslTypes) Extensions[type].$$iclasses.length = 0
|
|
36
|
+
for (const type of extDslTypes) Asciidoctor.Extensions[type].$$iclasses.length = 0
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/html-single-extension",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.8",
|
|
4
4
|
"description": "An Antora extension that uses Assembler to merge pages into assembly files, export them to standalone HTML documents, and publish them with the site.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "OpenDevise Inc. (https://opendevise.com)",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"#package": "./package.json"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@antora/assembler": "1.0.0-rc.
|
|
35
|
+
"@antora/assembler": "1.0.0-rc.8"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=20.0.0"
|