@canopycanopycanopy/b-ber-markdown-renderer 3.0.8-next.61 → 3.0.8-next.96
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/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -77
- package/package.json +28 -28
- package/dist/highlightjs/highlight.js +0 -821
- package/dist/highlightjs/index.js +0 -191
- package/dist/highlightjs/languages/1c.js +0 -216
- package/dist/highlightjs/languages/abnf.js +0 -41
- package/dist/highlightjs/languages/accesslog.js +0 -41
- package/dist/highlightjs/languages/actionscript.js +0 -55
- package/dist/highlightjs/languages/ada.js +0 -157
- package/dist/highlightjs/languages/angelscript.js +0 -94
- package/dist/highlightjs/languages/apache.js +0 -44
- package/dist/highlightjs/languages/applescript.js +0 -44
- package/dist/highlightjs/languages/arcade.js +0 -108
- package/dist/highlightjs/languages/arduino.js +0 -13
- package/dist/highlightjs/languages/armasm.js +0 -91
- package/dist/highlightjs/languages/asciidoc.js +0 -174
- package/dist/highlightjs/languages/aspectj.js +0 -99
- package/dist/highlightjs/languages/autohotkey.js +0 -57
- package/dist/highlightjs/languages/autoit.js +0 -105
- package/dist/highlightjs/languages/avrasm.js +0 -42
- package/dist/highlightjs/languages/awk.js +0 -46
- package/dist/highlightjs/languages/axapta.js +0 -21
- package/dist/highlightjs/languages/bash.js +0 -64
- package/dist/highlightjs/languages/basic.js +0 -36
- package/dist/highlightjs/languages/bnf.js +0 -26
- package/dist/highlightjs/languages/brainfuck.js +0 -29
- package/dist/highlightjs/languages/cal.js +0 -65
- package/dist/highlightjs/languages/capnproto.js +0 -42
- package/dist/highlightjs/languages/ceylon.js +0 -60
- package/dist/highlightjs/languages/clean.js +0 -16
- package/dist/highlightjs/languages/clojure-repl.js +0 -14
- package/dist/highlightjs/languages/clojure.js +0 -69
- package/dist/highlightjs/languages/cmake.js +0 -26
- package/dist/highlightjs/languages/coffeescript.js +0 -139
- package/dist/highlightjs/languages/coq.js +0 -19
- package/dist/highlightjs/languages/cos.js +0 -111
- package/dist/highlightjs/languages/cpp.js +0 -144
- package/dist/highlightjs/languages/crmsh.js +0 -72
- package/dist/highlightjs/languages/crystal.js +0 -233
- package/dist/highlightjs/languages/cs.js +0 -162
- package/dist/highlightjs/languages/csp.js +0 -21
- package/dist/highlightjs/languages/css.js +0 -90
- package/dist/highlightjs/languages/d.js +0 -213
- package/dist/highlightjs/languages/dart.js +0 -84
- package/dist/highlightjs/languages/delphi.js +0 -60
- package/dist/highlightjs/languages/diff.js +0 -51
- package/dist/highlightjs/languages/django.js +0 -39
- package/dist/highlightjs/languages/dns.js +0 -28
- package/dist/highlightjs/languages/dockerfile.js +0 -17
- package/dist/highlightjs/languages/dos.js +0 -38
- package/dist/highlightjs/languages/dsconfig.js +0 -48
- package/dist/highlightjs/languages/dts.js +0 -92
- package/dist/highlightjs/languages/dust.js +0 -31
- package/dist/highlightjs/languages/ebnf.js +0 -24
- package/dist/highlightjs/languages/elixir.js +0 -85
- package/dist/highlightjs/languages/elm.js +0 -77
- package/dist/highlightjs/languages/erb.js +0 -14
- package/dist/highlightjs/languages/erlang-repl.js +0 -33
- package/dist/highlightjs/languages/erlang.js +0 -114
- package/dist/highlightjs/languages/excel.js +0 -44
- package/dist/highlightjs/languages/fix.js +0 -27
- package/dist/highlightjs/languages/flix.js +0 -33
- package/dist/highlightjs/languages/fortran.js +0 -38
- package/dist/highlightjs/languages/fsharp.js +0 -49
- package/dist/highlightjs/languages/gams.js +0 -100
- package/dist/highlightjs/languages/gauss.js +0 -147
- package/dist/highlightjs/languages/gcode.js +0 -57
- package/dist/highlightjs/languages/gherkin.js +0 -31
- package/dist/highlightjs/languages/glsl.js +0 -28
- package/dist/highlightjs/languages/gml.js +0 -17
- package/dist/highlightjs/languages/go.js +0 -44
- package/dist/highlightjs/languages/golo.js +0 -14
- package/dist/highlightjs/languages/gradle.js +0 -11
- package/dist/highlightjs/languages/groovy.js +0 -73
- package/dist/highlightjs/languages/haml.js +0 -79
- package/dist/highlightjs/languages/handlebars.js +0 -32
- package/dist/highlightjs/languages/haskell.js +0 -102
- package/dist/highlightjs/languages/haxe.js +0 -125
- package/dist/highlightjs/languages/hsp.js +0 -33
- package/dist/highlightjs/languages/htmlbars.js +0 -66
- package/dist/highlightjs/languages/http.js +0 -49
- package/dist/highlightjs/languages/hy.js +0 -73
- package/dist/highlightjs/languages/inform7.js +0 -52
- package/dist/highlightjs/languages/ini.js +0 -59
- package/dist/highlightjs/languages/irpf90.js +0 -43
- package/dist/highlightjs/languages/isbl.js +0 -526
- package/dist/highlightjs/languages/java.js +0 -75
- package/dist/highlightjs/languages/javascript.js +0 -149
- package/dist/highlightjs/languages/jboss-cli.js +0 -43
- package/dist/highlightjs/languages/json.js +0 -44
- package/dist/highlightjs/languages/julia-repl.js +0 -23
- package/dist/highlightjs/languages/julia.js +0 -125
- package/dist/highlightjs/languages/kotlin.js +0 -167
- package/dist/highlightjs/languages/lasso.js +0 -126
- package/dist/highlightjs/languages/ldif.js +0 -30
- package/dist/highlightjs/languages/leaf.js +0 -33
- package/dist/highlightjs/languages/less.js +0 -167
- package/dist/highlightjs/languages/lisp.js +0 -101
- package/dist/highlightjs/languages/livecodeserver.js +0 -66
- package/dist/highlightjs/languages/livescript.js +0 -138
- package/dist/highlightjs/languages/llvm.js +0 -54
- package/dist/highlightjs/languages/lsl.js +0 -55
- package/dist/highlightjs/languages/lua.js +0 -51
- package/dist/highlightjs/languages/makefile.js +0 -65
- package/dist/highlightjs/languages/markdown.js +0 -111
- package/dist/highlightjs/languages/mathematica.js +0 -22
- package/dist/highlightjs/languages/matlab.js +0 -70
- package/dist/highlightjs/languages/maxima.js +0 -44
- package/dist/highlightjs/languages/mel.js +0 -17
- package/dist/highlightjs/languages/mercury.js +0 -63
- package/dist/highlightjs/languages/mipsasm.js +0 -86
- package/dist/highlightjs/languages/mizar.js +0 -8
- package/dist/highlightjs/languages/mojolicious.js +0 -25
- package/dist/highlightjs/languages/monkey.js +0 -53
- package/dist/highlightjs/languages/moonscript.js +0 -108
- package/dist/highlightjs/languages/n1ql.js +0 -39
- package/dist/highlightjs/languages/nginx.js +0 -100
- package/dist/highlightjs/languages/nimrod.js +0 -46
- package/dist/highlightjs/languages/nix.js +0 -42
- package/dist/highlightjs/languages/nsis.js +0 -73
- package/dist/highlightjs/languages/objectivec.js +0 -59
- package/dist/highlightjs/languages/ocaml.js +0 -54
- package/dist/highlightjs/languages/openscad.js +0 -54
- package/dist/highlightjs/languages/oxygene.js +0 -49
- package/dist/highlightjs/languages/parser3.js +0 -31
- package/dist/highlightjs/languages/perl.js +0 -124
- package/dist/highlightjs/languages/pf.js +0 -32
- package/dist/highlightjs/languages/pgsql.js +0 -370
- package/dist/highlightjs/languages/php.js +0 -97
- package/dist/highlightjs/languages/plaintext.js +0 -7
- package/dist/highlightjs/languages/pony.js +0 -53
- package/dist/highlightjs/languages/powershell.js +0 -77
- package/dist/highlightjs/languages/processing.js +0 -15
- package/dist/highlightjs/languages/profile.js +0 -28
- package/dist/highlightjs/languages/prolog.js +0 -62
- package/dist/highlightjs/languages/properties.js +0 -62
- package/dist/highlightjs/languages/protobuf.js +0 -33
- package/dist/highlightjs/languages/puppet.js +0 -77
- package/dist/highlightjs/languages/purebasic.js +0 -51
- package/dist/highlightjs/languages/python.js +0 -110
- package/dist/highlightjs/languages/q.js +0 -16
- package/dist/highlightjs/languages/qml.js +0 -136
- package/dist/highlightjs/languages/r.js +0 -56
- package/dist/highlightjs/languages/reasonml.js +0 -214
- package/dist/highlightjs/languages/rib.js +0 -9
- package/dist/highlightjs/languages/roboconf.js +0 -51
- package/dist/highlightjs/languages/routeros.js +0 -183
- package/dist/highlightjs/languages/rsl.js +0 -23
- package/dist/highlightjs/languages/ruby.js +0 -181
- package/dist/highlightjs/languages/ruleslanguage.js +0 -21
- package/dist/highlightjs/languages/rust.js +0 -91
- package/dist/highlightjs/languages/sas.js +0 -49
- package/dist/highlightjs/languages/scala.js +0 -96
- package/dist/highlightjs/languages/scheme.js +0 -103
- package/dist/highlightjs/languages/scilab.js +0 -46
- package/dist/highlightjs/languages/scss.js +0 -76
- package/dist/highlightjs/languages/shell.js +0 -15
- package/dist/highlightjs/languages/smali.js +0 -48
- package/dist/highlightjs/languages/smalltalk.js +0 -41
- package/dist/highlightjs/languages/sml.js +0 -51
- package/dist/highlightjs/languages/sqf.js +0 -50
- package/dist/highlightjs/languages/sql.js +0 -40
- package/dist/highlightjs/languages/stan.js +0 -56
- package/dist/highlightjs/languages/stata.js +0 -28
- package/dist/highlightjs/languages/step21.js +0 -41
- package/dist/highlightjs/languages/stylus.js +0 -124
- package/dist/highlightjs/languages/subunit.js +0 -34
- package/dist/highlightjs/languages/swift.js +0 -90
- package/dist/highlightjs/languages/taggerscript.js +0 -35
- package/dist/highlightjs/languages/tap.js +0 -38
- package/dist/highlightjs/languages/tcl.js +0 -38
- package/dist/highlightjs/languages/tex.js +0 -56
- package/dist/highlightjs/languages/thrift.js +0 -29
- package/dist/highlightjs/languages/tp.js +0 -58
- package/dist/highlightjs/languages/twig.js +0 -55
- package/dist/highlightjs/languages/typescript.js +0 -120
- package/dist/highlightjs/languages/vala.js +0 -41
- package/dist/highlightjs/languages/vbnet.js +0 -53
- package/dist/highlightjs/languages/vbscript-html.js +0 -12
- package/dist/highlightjs/languages/vbscript.js +0 -21
- package/dist/highlightjs/languages/verilog.js +0 -44
- package/dist/highlightjs/languages/vhdl.js +0 -40
- package/dist/highlightjs/languages/vim.js +0 -53
- package/dist/highlightjs/languages/x86asm.js +0 -110
- package/dist/highlightjs/languages/xl.js +0 -55
- package/dist/highlightjs/languages/xml.js +0 -128
- package/dist/highlightjs/languages/xquery.js +0 -134
- package/dist/highlightjs/languages/yaml.js +0 -95
- package/dist/highlightjs/languages/zephir.js +0 -77
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import MarkdownIt from "markdown-it";
|
|
2
|
+
|
|
3
|
+
//#region src/index.d.ts
|
|
4
|
+
declare class MarkdownRenderer {
|
|
5
|
+
fileName: string;
|
|
6
|
+
markdownIt: MarkdownIt;
|
|
7
|
+
constructor();
|
|
8
|
+
template(meta: string): string;
|
|
9
|
+
prepare(data: string): string;
|
|
10
|
+
render(fileName: string, data: string): string;
|
|
11
|
+
}
|
|
12
|
+
declare const markdownRenderer: MarkdownRenderer;
|
|
13
|
+
export = markdownRenderer;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;cAqBM,gBAAA;EACJ,QAAA;EACA,UAAA,EAAY,UAAU;;EAmFtB,QAAA,CAAS,IAAA;EAYT,OAAA,CAAQ,IAAA;EAKR,MAAA,CAAO,QAAA,UAAkB,IAAA;AAAA;AAAA,cAOrB,gBAAA,EAAgB,gBAAyB;AAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,78 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
let _canopycanopycanopy_b_ber_grammar_audio_video = require("@canopycanopycanopy/b-ber-grammar-audio-video");
|
|
24
|
+
_canopycanopycanopy_b_ber_grammar_audio_video = __toESM(_canopycanopycanopy_b_ber_grammar_audio_video);
|
|
25
|
+
let _canopycanopycanopy_b_ber_grammar_dialogue = require("@canopycanopycanopy/b-ber-grammar-dialogue");
|
|
26
|
+
_canopycanopycanopy_b_ber_grammar_dialogue = __toESM(_canopycanopycanopy_b_ber_grammar_dialogue);
|
|
27
|
+
let _canopycanopycanopy_b_ber_grammar_footnotes = require("@canopycanopycanopy/b-ber-grammar-footnotes");
|
|
28
|
+
_canopycanopycanopy_b_ber_grammar_footnotes = __toESM(_canopycanopycanopy_b_ber_grammar_footnotes);
|
|
29
|
+
let _canopycanopycanopy_b_ber_grammar_frontmatter = require("@canopycanopycanopy/b-ber-grammar-frontmatter");
|
|
30
|
+
_canopycanopycanopy_b_ber_grammar_frontmatter = __toESM(_canopycanopycanopy_b_ber_grammar_frontmatter);
|
|
31
|
+
let _canopycanopycanopy_b_ber_grammar_gallery = require("@canopycanopycanopy/b-ber-grammar-gallery");
|
|
32
|
+
_canopycanopycanopy_b_ber_grammar_gallery = __toESM(_canopycanopycanopy_b_ber_grammar_gallery);
|
|
33
|
+
let _canopycanopycanopy_b_ber_grammar_iframe = require("@canopycanopycanopy/b-ber-grammar-iframe");
|
|
34
|
+
_canopycanopycanopy_b_ber_grammar_iframe = __toESM(_canopycanopycanopy_b_ber_grammar_iframe);
|
|
35
|
+
let _canopycanopycanopy_b_ber_grammar_image = require("@canopycanopycanopy/b-ber-grammar-image");
|
|
36
|
+
_canopycanopycanopy_b_ber_grammar_image = __toESM(_canopycanopycanopy_b_ber_grammar_image);
|
|
37
|
+
let _canopycanopycanopy_b_ber_grammar_logo = require("@canopycanopycanopy/b-ber-grammar-logo");
|
|
38
|
+
_canopycanopycanopy_b_ber_grammar_logo = __toESM(_canopycanopycanopy_b_ber_grammar_logo);
|
|
39
|
+
let _canopycanopycanopy_b_ber_grammar_media = require("@canopycanopycanopy/b-ber-grammar-media");
|
|
40
|
+
_canopycanopycanopy_b_ber_grammar_media = __toESM(_canopycanopycanopy_b_ber_grammar_media);
|
|
41
|
+
let _canopycanopycanopy_b_ber_grammar_pullquote = require("@canopycanopycanopy/b-ber-grammar-pullquote");
|
|
42
|
+
_canopycanopycanopy_b_ber_grammar_pullquote = __toESM(_canopycanopycanopy_b_ber_grammar_pullquote);
|
|
43
|
+
let _canopycanopycanopy_b_ber_grammar_section = require("@canopycanopycanopy/b-ber-grammar-section");
|
|
44
|
+
_canopycanopycanopy_b_ber_grammar_section = __toESM(_canopycanopycanopy_b_ber_grammar_section);
|
|
45
|
+
let _canopycanopycanopy_b_ber_grammar_spread = require("@canopycanopycanopy/b-ber-grammar-spread");
|
|
46
|
+
_canopycanopycanopy_b_ber_grammar_spread = __toESM(_canopycanopycanopy_b_ber_grammar_spread);
|
|
47
|
+
let _canopycanopycanopy_b_ber_grammar_vimeo = require("@canopycanopycanopy/b-ber-grammar-vimeo");
|
|
48
|
+
_canopycanopycanopy_b_ber_grammar_vimeo = __toESM(_canopycanopycanopy_b_ber_grammar_vimeo);
|
|
49
|
+
let _canopycanopycanopy_b_ber_parser_footnotes = require("@canopycanopycanopy/b-ber-parser-footnotes");
|
|
50
|
+
_canopycanopycanopy_b_ber_parser_footnotes = __toESM(_canopycanopycanopy_b_ber_parser_footnotes);
|
|
51
|
+
let highlight_js = require("highlight.js");
|
|
52
|
+
highlight_js = __toESM(highlight_js);
|
|
53
|
+
let markdown_it = require("markdown-it");
|
|
54
|
+
markdown_it = __toESM(markdown_it);
|
|
55
|
+
let markdown_it_front_matter = require("markdown-it-front-matter");
|
|
56
|
+
markdown_it_front_matter = __toESM(markdown_it_front_matter);
|
|
57
|
+
//#region src/index.ts
|
|
58
|
+
const LINE_BREAK = "\n";
|
|
59
|
+
const SPACE = " ";
|
|
60
|
+
var MarkdownRenderer = class {
|
|
61
|
+
fileName;
|
|
62
|
+
markdownIt;
|
|
63
|
+
constructor() {
|
|
64
|
+
this.fileName = "";
|
|
65
|
+
this.markdownIt = new markdown_it.default({
|
|
66
|
+
html: true,
|
|
67
|
+
xhtmlOut: true,
|
|
68
|
+
breaks: false,
|
|
69
|
+
linkify: false,
|
|
70
|
+
highlight: (str, lang) => {
|
|
71
|
+
if (lang && highlight_js.default.getLanguage(lang)) try {
|
|
72
|
+
return highlight_js.default.highlight(str, { language: lang }).value;
|
|
73
|
+
} catch (_) {}
|
|
74
|
+
return "";
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const reference = {
|
|
78
|
+
instance: this.markdownIt,
|
|
79
|
+
context: this
|
|
80
|
+
};
|
|
81
|
+
this.markdownIt.use(_canopycanopycanopy_b_ber_grammar_section.default.plugin, _canopycanopycanopy_b_ber_grammar_section.default.name, _canopycanopycanopy_b_ber_grammar_section.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_pullquote.default.plugin, _canopycanopycanopy_b_ber_grammar_pullquote.default.name, _canopycanopycanopy_b_ber_grammar_pullquote.default.renderer(reference)).use(markdown_it_front_matter.default, (0, _canopycanopycanopy_b_ber_grammar_frontmatter.default)(this)).use(_canopycanopycanopy_b_ber_parser_footnotes.default, (0, _canopycanopycanopy_b_ber_grammar_footnotes.default)(this)).use(_canopycanopycanopy_b_ber_grammar_dialogue.default.plugin, _canopycanopycanopy_b_ber_grammar_dialogue.default.name, _canopycanopycanopy_b_ber_grammar_dialogue.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_gallery.default.plugin, _canopycanopycanopy_b_ber_grammar_gallery.default.name, _canopycanopycanopy_b_ber_grammar_gallery.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_spread.default.plugin, _canopycanopycanopy_b_ber_grammar_spread.default.name, _canopycanopycanopy_b_ber_grammar_spread.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_image.default.plugin, _canopycanopycanopy_b_ber_grammar_image.default.name, _canopycanopycanopy_b_ber_grammar_image.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_audio_video.default.plugin, _canopycanopycanopy_b_ber_grammar_audio_video.default.name, _canopycanopycanopy_b_ber_grammar_audio_video.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_vimeo.default.plugin, _canopycanopycanopy_b_ber_grammar_vimeo.default.name, _canopycanopycanopy_b_ber_grammar_vimeo.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_iframe.default.plugin, _canopycanopycanopy_b_ber_grammar_iframe.default.name, _canopycanopycanopy_b_ber_grammar_iframe.default.renderer(reference)).use(_canopycanopycanopy_b_ber_grammar_logo.default.plugin, _canopycanopycanopy_b_ber_grammar_logo.default.name, _canopycanopycanopy_b_ber_grammar_logo.default.renderer(reference));
|
|
82
|
+
}
|
|
83
|
+
template(meta) {
|
|
84
|
+
const str = meta.split(LINE_BREAK).map((value) => `${SPACE.repeat(2)}${value}`).join(LINE_BREAK);
|
|
85
|
+
return `-${LINE_BREAK}${SPACE.repeat(2)}fileName: ${this.fileName}${LINE_BREAK}${str}${LINE_BREAK}`;
|
|
86
|
+
}
|
|
87
|
+
prepare(data) {
|
|
88
|
+
return _canopycanopycanopy_b_ber_grammar_media.default.render(data);
|
|
89
|
+
}
|
|
90
|
+
render(fileName, data) {
|
|
91
|
+
this.fileName = fileName;
|
|
92
|
+
const transformedData = this.prepare(data);
|
|
93
|
+
return this.markdownIt.render(transformedData);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
77
96
|
const markdownRenderer = new MarkdownRenderer();
|
|
78
|
-
|
|
97
|
+
//#endregion
|
|
98
|
+
module.exports = markdownRenderer;
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canopycanopycanopy/b-ber-markdown-renderer",
|
|
3
|
-
"version": "3.0.8-next.
|
|
3
|
+
"version": "3.0.8-next.96+7446845b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"prepare": "npm run clean && npm run prepare:dist",
|
|
10
|
-
"build": "npm run prepare",
|
|
11
|
-
"watch": "BABEL_ENV=production babel --config-file ../../babel.config.js -d dist/ src/ --watch src",
|
|
8
|
+
"build": "tsdown",
|
|
9
|
+
"typecheck": "tsc --noEmit",
|
|
12
10
|
"test": "jest"
|
|
13
11
|
},
|
|
14
12
|
"author": "Triple Canopy <b-ber@canopycanopycanopy.com> (https://triplecanopy.github.io/)",
|
|
@@ -17,29 +15,31 @@
|
|
|
17
15
|
"access": "public"
|
|
18
16
|
},
|
|
19
17
|
"devDependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
18
|
+
"@swc/core": "^1.15.40",
|
|
19
|
+
"@swc/jest": "^0.2.39",
|
|
20
|
+
"@types/markdown-it": "^14.1.2",
|
|
21
|
+
"jest": "^29.7.0",
|
|
22
|
+
"rimraf": "^2.7.1",
|
|
23
|
+
"tsdown": "^0.22.1",
|
|
24
|
+
"typescript": "^6.0.3"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@canopycanopycanopy/b-ber-grammar-audio-video": "3.0.8-next.
|
|
29
|
-
"@canopycanopycanopy/b-ber-grammar-dialogue": "3.0.8-next.
|
|
30
|
-
"@canopycanopycanopy/b-ber-grammar-footnotes": "3.0.8-next.
|
|
31
|
-
"@canopycanopycanopy/b-ber-grammar-frontmatter": "3.0.8-next.
|
|
32
|
-
"@canopycanopycanopy/b-ber-grammar-gallery": "3.0.8-next.
|
|
33
|
-
"@canopycanopycanopy/b-ber-grammar-iframe": "3.0.8-next.
|
|
34
|
-
"@canopycanopycanopy/b-ber-grammar-image": "3.0.8-next.
|
|
35
|
-
"@canopycanopycanopy/b-ber-grammar-logo": "3.0.8-next.
|
|
36
|
-
"@canopycanopycanopy/b-ber-grammar-media": "3.0.8-next.
|
|
37
|
-
"@canopycanopycanopy/b-ber-grammar-pullquote": "3.0.8-next.
|
|
38
|
-
"@canopycanopycanopy/b-ber-grammar-section": "3.0.8-next.
|
|
39
|
-
"@canopycanopycanopy/b-ber-grammar-spread": "3.0.8-next.
|
|
40
|
-
"@canopycanopycanopy/b-ber-grammar-vimeo": "3.0.8-next.
|
|
41
|
-
"@canopycanopycanopy/b-ber-parser-footnotes": "3.0.8-next.
|
|
42
|
-
"@canopycanopycanopy/b-ber-parser-gallery": "3.0.8-next.
|
|
27
|
+
"@canopycanopycanopy/b-ber-grammar-audio-video": "3.0.8-next.96+7446845b",
|
|
28
|
+
"@canopycanopycanopy/b-ber-grammar-dialogue": "3.0.8-next.96+7446845b",
|
|
29
|
+
"@canopycanopycanopy/b-ber-grammar-footnotes": "3.0.8-next.96+7446845b",
|
|
30
|
+
"@canopycanopycanopy/b-ber-grammar-frontmatter": "3.0.8-next.96+7446845b",
|
|
31
|
+
"@canopycanopycanopy/b-ber-grammar-gallery": "3.0.8-next.96+7446845b",
|
|
32
|
+
"@canopycanopycanopy/b-ber-grammar-iframe": "3.0.8-next.96+7446845b",
|
|
33
|
+
"@canopycanopycanopy/b-ber-grammar-image": "3.0.8-next.96+7446845b",
|
|
34
|
+
"@canopycanopycanopy/b-ber-grammar-logo": "3.0.8-next.96+7446845b",
|
|
35
|
+
"@canopycanopycanopy/b-ber-grammar-media": "3.0.8-next.96+7446845b",
|
|
36
|
+
"@canopycanopycanopy/b-ber-grammar-pullquote": "3.0.8-next.96+7446845b",
|
|
37
|
+
"@canopycanopycanopy/b-ber-grammar-section": "3.0.8-next.96+7446845b",
|
|
38
|
+
"@canopycanopycanopy/b-ber-grammar-spread": "3.0.8-next.96+7446845b",
|
|
39
|
+
"@canopycanopycanopy/b-ber-grammar-vimeo": "3.0.8-next.96+7446845b",
|
|
40
|
+
"@canopycanopycanopy/b-ber-parser-footnotes": "3.0.8-next.96+7446845b",
|
|
41
|
+
"@canopycanopycanopy/b-ber-parser-gallery": "3.0.8-next.96+7446845b",
|
|
42
|
+
"highlight.js": "^11.11.1",
|
|
43
43
|
"lodash": "^4.17.21",
|
|
44
44
|
"markdown-it": "^8.4.1",
|
|
45
45
|
"markdown-it-front-matter": "^0.1.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"url": "https://maxwellsimmer.com"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "7446845bcda4337bfbc9f75b55a1e0ca805023eb"
|
|
66
66
|
}
|