fix
This commit is contained in:
3
book/node_modules/@honkit/asciidoc/lib/index.d.ts
generated
vendored
Normal file
3
book/node_modules/@honkit/asciidoc/lib/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
declare const _default: import("@honkit/html").Parsers;
|
||||
export default _default;
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
book/node_modules/@honkit/asciidoc/lib/index.d.ts.map
generated
vendored
Normal file
1
book/node_modules/@honkit/asciidoc/lib/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAIA,wBAAgD"}
|
9
book/node_modules/@honkit/asciidoc/lib/index.js
generated
vendored
Normal file
9
book/node_modules/@honkit/asciidoc/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const html_1 = require("@honkit/html");
|
||||
const toHTML_1 = __importDefault(require("./toHTML"));
|
||||
const toAsciidoc_1 = __importDefault(require("./toAsciidoc"));
|
||||
exports.default = (0, html_1.createParser)(toHTML_1.default, toAsciidoc_1.default);
|
15
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.d.ts
generated
vendored
Normal file
15
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
declare const _default: {
|
||||
onTitleStart: (level: any) => string;
|
||||
onTitleEnd: (level: any) => any;
|
||||
onParagraphStart: () => any;
|
||||
onParagraphEnd: () => any;
|
||||
onLinkStart: (href: any) => string;
|
||||
onLinkEnd: () => string;
|
||||
onListStart: (level: any) => string;
|
||||
onListEnd: () => string;
|
||||
onListItemStart: (level: any) => string;
|
||||
onListItemEnd: () => string;
|
||||
onHR: () => string;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=toAsciidoc.d.ts.map
|
1
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.d.ts.map
generated
vendored
Normal file
1
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"toAsciidoc.d.ts","sourceRoot":"","sources":["../src/toAsciidoc.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAKA,wBAuCE"}
|
41
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.js
generated
vendored
Normal file
41
book/node_modules/@honkit/asciidoc/lib/toAsciidoc.js
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// Return N time a string
|
||||
function ns(s, n) {
|
||||
return Array(n + 1).join(s);
|
||||
}
|
||||
exports.default = {
|
||||
onTitleStart: function (level) {
|
||||
return `${ns("=", level)} `;
|
||||
},
|
||||
onTitleEnd: function (level) {
|
||||
return this.onBL();
|
||||
},
|
||||
onParagraphStart: function () {
|
||||
return this.onSection();
|
||||
},
|
||||
onParagraphEnd: function () {
|
||||
return this.onSection();
|
||||
},
|
||||
onLinkStart: function (href) {
|
||||
return `link:${href}[`;
|
||||
},
|
||||
onLinkEnd: function () {
|
||||
return "]";
|
||||
},
|
||||
onListStart: function (level) {
|
||||
return "";
|
||||
},
|
||||
onListEnd: function () {
|
||||
return "";
|
||||
},
|
||||
onListItemStart: function (level) {
|
||||
return `${ns(".", level + 1)} `;
|
||||
},
|
||||
onListItemEnd: function () {
|
||||
return "";
|
||||
},
|
||||
onHR: function () {
|
||||
return "'''";
|
||||
}
|
||||
};
|
7
book/node_modules/@honkit/asciidoc/lib/toHTML.d.ts
generated
vendored
Normal file
7
book/node_modules/@honkit/asciidoc/lib/toHTML.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
import { ToHTMLFunction } from "@honkit/html";
|
||||
declare const _default: {
|
||||
block: ToHTMLFunction;
|
||||
inline: ToHTMLFunction;
|
||||
};
|
||||
export default _default;
|
||||
//# sourceMappingURL=toHTML.d.ts.map
|
1
book/node_modules/@honkit/asciidoc/lib/toHTML.d.ts.map
generated
vendored
Normal file
1
book/node_modules/@honkit/asciidoc/lib/toHTML.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"toHTML.d.ts","sourceRoot":"","sources":["../src/toHTML.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;;;;;AAkB9C,wBAGE"}
|
23
book/node_modules/@honkit/asciidoc/lib/toHTML.js
generated
vendored
Normal file
23
book/node_modules/@honkit/asciidoc/lib/toHTML.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const asciidoctor_1 = __importDefault(require("asciidoctor"));
|
||||
const asciidoctor = (0, asciidoctor_1.default)();
|
||||
// Render Asciidoc to HTML (block)
|
||||
const asciidocToHTML = (content, options) => {
|
||||
return asciidoctor.convert(content, {
|
||||
safe: "server",
|
||||
attributes: { showtitle: "", icons: "font@" },
|
||||
base_dir: options?.baseDirectory
|
||||
});
|
||||
};
|
||||
// Render Asciidoc to HTML (inline)
|
||||
const asciidocToHTMLInline = (content, options) => {
|
||||
return asciidoctor.convert(content, { doctype: "inline", base_dir: options?.baseDirectory });
|
||||
};
|
||||
exports.default = {
|
||||
block: asciidocToHTML,
|
||||
inline: asciidocToHTMLInline
|
||||
};
|
Reference in New Issue
Block a user