-
Notifications
You must be signed in to change notification settings - Fork 2
/
mod.ts
60 lines (58 loc) · 1.31 KB
/
mod.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
/*
* Copyright 2024 LambdAurora <[email protected]>
*
* This file is part of lib.md.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/**
* # lib.md
*
* A Markdown AST, parser, and rendering library.
*
* ## Quick Example
*
* ```ts
* import * as html from "@lambdaurora/libhtml";
* import * as md from "@lambdaurora/libmd";
*
* const doc: md.Document = div.parser.parse(`# lib.md
*
* A Markdown AST, parser, and rendering library.
*
* ## Quick Example
*
* <!-- Insert code -->
* `); // Markdown document.
*
* const div: html.Element = md.render_to_html(doc, {
* // Options
* strikethrough: {
* class_name: "md_underline"
* },
* underline: {
* enable: false
* }
* });
*
* const str = div.html(); // String representation.
*
* // Alternatively, as a shorthand for browsers:
* const div_dom: HTMLElement = md.render_to_dom(doc, window.document, {
* // Options
* strikethrough: {
* class_name: "md_underline"
* },
* underline: {
* enable: false
* }
* });
* console.log(div_dom.outerHTML); // String representation.
* ```
*
* @module
*/
export * from "./lib/index.ts";
export * as utils from "./lib/utils.ts";