@thi.ng/hiccup-markdown 3.2.187 → 3.2.189
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/README.md +32 -30
- package/api.d.ts +2 -2
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
|
-
<!-- Please see: https://
|
|
3
|
-
# 
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@thi.ng/hiccup-markdown)
|
|
6
6
|

|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
10
|
> This is one of 214 standalone projects, maintained as part
|
|
11
|
-
> of the [@thi.ng/umbrella](https://
|
|
11
|
+
> of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
14
|
-
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
-
>
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring
|
|
15
|
+
> me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
|
|
16
|
+
> Thank you! ❤️
|
|
16
17
|
|
|
17
18
|
- [About](#about)
|
|
18
19
|
- [Parser](#parser)
|
|
@@ -45,13 +46,13 @@
|
|
|
45
46
|
|
|
46
47
|
## About
|
|
47
48
|
|
|
48
|
-
Markdown parser & serializer from/to Hiccup format. This is a support package for [@thi.ng/hiccup](https://
|
|
49
|
+
Markdown parser & serializer from/to Hiccup format. This is a support package for [@thi.ng/hiccup](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hiccup).
|
|
49
50
|
|
|
50
51
|
**⚠️ IMPORTANT: With v3.0.0 the parser implementation underwent a complete
|
|
51
52
|
rewrite (with breaking changes, but lots of improvements). ⚠️**
|
|
52
53
|
|
|
53
54
|
This package provides both a customizable
|
|
54
|
-
[Markdown](https://en.wikipedia.org/wiki/Markdown)-to-[Hiccup](https://
|
|
55
|
+
[Markdown](https://en.wikipedia.org/wiki/Markdown)-to-[Hiccup](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hiccup)
|
|
55
56
|
parser and an extensible Hiccup-to-Markdown converter.
|
|
56
57
|
|
|
57
58
|
## Parser
|
|
@@ -97,7 +98,7 @@ details/examples...**
|
|
|
97
98
|
|
|
98
99
|
In addition to the **mandatory language hint**, code blocks support optional
|
|
99
100
|
user defined headers/metadata. Items will be separated by spaces (e.g. see
|
|
100
|
-
[@thi.ng/tangle](https://
|
|
101
|
+
[@thi.ng/tangle](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/tangle)
|
|
101
102
|
for concrete use cases).
|
|
102
103
|
|
|
103
104
|
(Note: the GFM codeblock fences are only shown escaped here to avoid GH
|
|
@@ -137,7 +138,7 @@ transformer. The default handler merely creates an element like this:
|
|
|
137
138
|
```
|
|
138
139
|
|
|
139
140
|
**Tip:** Use a
|
|
140
|
-
[`defmulti()`](https://
|
|
141
|
+
[`defmulti()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/defmulti)
|
|
141
142
|
polymorphic function as tag transformer to elegantly handle multiple types of
|
|
142
143
|
custom blocks (in an easily extensible manner).
|
|
143
144
|
|
|
@@ -382,7 +383,7 @@ Not (yet) supported:
|
|
|
382
383
|
|
|
383
384
|
Also, other element types can be supported by adding a new tag specific
|
|
384
385
|
implementation to the exported `serializeElement`
|
|
385
|
-
[multi-method](https://
|
|
386
|
+
[multi-method](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/defmulti).
|
|
386
387
|
See source code for reference.
|
|
387
388
|
|
|
388
389
|
### Usage examples
|
|
@@ -518,11 +519,11 @@ More info [here](http://thi.ng/hiccup-markdown).
|
|
|
518
519
|
|
|
519
520
|
**STABLE** - used in production
|
|
520
521
|
|
|
521
|
-
[Search or submit any issues for this package](https://
|
|
522
|
+
[Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Bhiccup-markdown%5D)
|
|
522
523
|
|
|
523
524
|
## Related packages
|
|
524
525
|
|
|
525
|
-
- [@thi.ng/markdown-table](https://
|
|
526
|
+
- [@thi.ng/markdown-table](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/markdown-table) - Markdown table formatter/generator with support for column alignments
|
|
526
527
|
|
|
527
528
|
## Installation
|
|
528
529
|
|
|
@@ -550,34 +551,35 @@ For Node.js REPL:
|
|
|
550
551
|
const md = await import("@thi.ng/hiccup-markdown");
|
|
551
552
|
```
|
|
552
553
|
|
|
553
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 4.
|
|
554
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 4.63 KB
|
|
554
555
|
|
|
555
556
|
## Dependencies
|
|
556
557
|
|
|
557
|
-
- [@thi.ng/api](https://
|
|
558
|
-
- [@thi.ng/arrays](https://
|
|
559
|
-
- [@thi.ng/checks](https://
|
|
560
|
-
- [@thi.ng/defmulti](https://
|
|
561
|
-
- [@thi.ng/emoji](https://
|
|
562
|
-
- [@thi.ng/errors](https://
|
|
563
|
-
- [@thi.ng/hiccup](https://
|
|
564
|
-
- [@thi.ng/logger](https://
|
|
565
|
-
- [@thi.ng/parse](https://
|
|
566
|
-
- [@thi.ng/strings](https://
|
|
567
|
-
- [@thi.ng/text-canvas](https://
|
|
558
|
+
- [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)
|
|
559
|
+
- [@thi.ng/arrays](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/arrays)
|
|
560
|
+
- [@thi.ng/checks](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/checks)
|
|
561
|
+
- [@thi.ng/defmulti](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/defmulti)
|
|
562
|
+
- [@thi.ng/emoji](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/emoji)
|
|
563
|
+
- [@thi.ng/errors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/errors)
|
|
564
|
+
- [@thi.ng/hiccup](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/hiccup)
|
|
565
|
+
- [@thi.ng/logger](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/logger)
|
|
566
|
+
- [@thi.ng/parse](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/parse)
|
|
567
|
+
- [@thi.ng/strings](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/strings)
|
|
568
|
+
- [@thi.ng/text-canvas](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/text-canvas)
|
|
568
569
|
|
|
569
570
|
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
570
571
|
|
|
571
572
|
## Usage examples
|
|
572
573
|
|
|
573
|
-
|
|
574
|
-
[/examples](https://
|
|
574
|
+
Three projects in this repo's
|
|
575
|
+
[/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
|
|
575
576
|
directory are using this package:
|
|
576
577
|
|
|
577
|
-
| Screenshot | Description | Live demo | Source
|
|
578
|
-
|
|
579
|
-
| <img src="https://
|
|
580
|
-
| <img src="https://
|
|
578
|
+
| Screenshot | Description | Live demo | Source |
|
|
579
|
+
|:-----------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------|:-----------------------------------------------------|:------------------------------------------------------------------------------------------|
|
|
580
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/darkroom-calc.avif" width="240"/> | Useful small calculators for darkroom processing | [Demo](https://demo.thi.ng/umbrella/darkroom-calc/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/darkroom-calc) |
|
|
581
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/markdown-parser.jpg" width="240"/> | Markdown to Hiccup to HTML parser / transformer | [Demo](https://demo.thi.ng/umbrella/markdown/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/markdown) |
|
|
582
|
+
| <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/related-images.jpg" width="240"/> | Responsive image gallery with tag-based Jaccard similarity ranking | [Demo](https://demo.thi.ng/umbrella/related-images/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/related-images) |
|
|
581
583
|
|
|
582
584
|
## API
|
|
583
585
|
|
package/api.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { ParseState } from "@thi.ng/parse";
|
|
|
7
7
|
* provides default implementations for all to generate minimal hiccup output.
|
|
8
8
|
*
|
|
9
9
|
* See the [markdown example
|
|
10
|
-
* project](https://
|
|
10
|
+
* project](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/markdown)
|
|
11
11
|
* for how these can be customized.
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
@@ -321,7 +321,7 @@ export interface ParseOpts {
|
|
|
321
321
|
*
|
|
322
322
|
* @remarks
|
|
323
323
|
* Reference:
|
|
324
|
-
* - https://
|
|
324
|
+
* - https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/strings/src/entities.ts
|
|
325
325
|
*
|
|
326
326
|
* @defaultValue false
|
|
327
327
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/hiccup-markdown",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.189",
|
|
4
4
|
"description": "Markdown parser & serializer from/to Hiccup format",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://
|
|
11
|
+
"url": "git+https://codeberg.org/thi.ng/umbrella.git",
|
|
12
12
|
"directory": "packages/hiccup-markdown"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://thi.ng/hiccup-markdown",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.12.
|
|
44
|
-
"@thi.ng/arrays": "^2.14.
|
|
45
|
-
"@thi.ng/checks": "^3.8.
|
|
46
|
-
"@thi.ng/defmulti": "^3.0.
|
|
47
|
-
"@thi.ng/emoji": "^1.0.
|
|
48
|
-
"@thi.ng/errors": "^2.6.
|
|
49
|
-
"@thi.ng/hiccup": "^5.4.
|
|
50
|
-
"@thi.ng/logger": "^3.3.
|
|
51
|
-
"@thi.ng/parse": "^2.6.
|
|
52
|
-
"@thi.ng/strings": "^3.
|
|
53
|
-
"@thi.ng/text-canvas": "^3.0.
|
|
43
|
+
"@thi.ng/api": "^8.12.18",
|
|
44
|
+
"@thi.ng/arrays": "^2.14.14",
|
|
45
|
+
"@thi.ng/checks": "^3.8.8",
|
|
46
|
+
"@thi.ng/defmulti": "^3.0.95",
|
|
47
|
+
"@thi.ng/emoji": "^1.0.36",
|
|
48
|
+
"@thi.ng/errors": "^2.6.7",
|
|
49
|
+
"@thi.ng/hiccup": "^5.4.3",
|
|
50
|
+
"@thi.ng/logger": "^3.3.1",
|
|
51
|
+
"@thi.ng/parse": "^2.6.50",
|
|
52
|
+
"@thi.ng/strings": "^3.12.0",
|
|
53
|
+
"@thi.ng/text-canvas": "^3.0.116"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"esbuild": "^0.27.2",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
],
|
|
103
103
|
"year": 2018
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "929fb6590178a41cbb77cbb87e07c59c61381607\n"
|
|
106
106
|
}
|