longdown 2024.4.13 → 2026.2.1
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 +38 -0
- package/lib/cli.js +4 -2
- package/lib/cljs-runtime/cljs.core.js +5658 -5658
- package/lib/cljs-runtime/cljs.core.js.map +1 -1
- package/lib/cljs-runtime/clojure.string.js +53 -53
- package/lib/cljs-runtime/clojure.string.js.map +1 -1
- package/lib/cljs-runtime/clojure.tools.cli.js +542 -542
- package/lib/cljs-runtime/clojure.tools.cli.js.map +1 -1
- package/lib/cljs-runtime/clojure.walk.js +21 -21
- package/lib/cljs-runtime/clojure.walk.js.map +1 -1
- package/lib/cljs-runtime/longdown.cli.js +73 -64
- package/lib/cljs-runtime/longdown.cli.js.map +1 -1
- package/lib/cljs-runtime/longdown.lib.js +140 -33
- package/lib/cljs-runtime/longdown.lib.js.map +1 -1
- package/lib/cljs-runtime/shadow.esm.esm_import$rehype_parse.js +5 -0
- package/lib/cljs-runtime/shadow.esm.esm_import$rehype_parse.js.map +9 -0
- package/lib/cljs-runtime/shadow.esm.esm_import$rehype_remark.js +5 -0
- package/lib/cljs-runtime/shadow.esm.esm_import$rehype_remark.js.map +9 -0
- package/lib/cljs-runtime/shadow.module.cli.prepend.js +4 -2
- package/package.json +6 -6
- package/lib/cljs-runtime/shadow.esm.esm_import$mdast_util_to_markdown$lib$unsafe.js +0 -5
- package/lib/cljs-runtime/shadow.esm.esm_import$mdast_util_to_markdown$lib$unsafe.js.map +0 -9
package/README.md
CHANGED
|
@@ -76,6 +76,44 @@ On macOS:
|
|
|
76
76
|
pbpaste | longdown - | pbcopy
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
#### Converting HTML
|
|
80
|
+
|
|
81
|
+
Use `--html` to parse HTML which is useful for copying results to Logseq from web LLM UIs to preserve formatting.
|
|
82
|
+
|
|
83
|
+
Add `--strip-highlights` option to strip bold formatting which tends to be overused by LLMs.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
xclip -selection clipboard -out -target text/html | longdown --html --strip-highlights - | xclip -selection clipboard -in
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For example:
|
|
90
|
+
```html
|
|
91
|
+
<h2>1. Introduction</h2>
|
|
92
|
+
<p><strong>Key point</strong>: This is important.</p>
|
|
93
|
+
<ul>
|
|
94
|
+
<li><strong>First item</strong>: description</li>
|
|
95
|
+
<li>normal item</li>
|
|
96
|
+
</ul>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Gets converted into:
|
|
100
|
+
```
|
|
101
|
+
- ## 1. Introduction
|
|
102
|
+
- **Key point**: This is important.
|
|
103
|
+
-
|
|
104
|
+
- **First item**: description
|
|
105
|
+
- normal item
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
With `--strip-highlights`:
|
|
109
|
+
```
|
|
110
|
+
- Introduction
|
|
111
|
+
- Key point: This is important.
|
|
112
|
+
-
|
|
113
|
+
- First item: description
|
|
114
|
+
- normal item
|
|
115
|
+
```
|
|
116
|
+
|
|
79
117
|
## License
|
|
80
118
|
|
|
81
119
|
0BSD
|
package/lib/cli.js
CHANGED
|
@@ -100,8 +100,10 @@ import "./cljs-runtime/shadow.esm.esm_import$mdast_util_from_markdown.js";
|
|
|
100
100
|
SHADOW_ENV.setLoaded("shadow.esm.esm_import$mdast_util_from_markdown.js");
|
|
101
101
|
import "./cljs-runtime/shadow.esm.esm_import$mdast_util_to_markdown.js";
|
|
102
102
|
SHADOW_ENV.setLoaded("shadow.esm.esm_import$mdast_util_to_markdown.js");
|
|
103
|
-
import "./cljs-runtime/shadow.esm.esm_import$
|
|
104
|
-
SHADOW_ENV.setLoaded("shadow.esm.esm_import$
|
|
103
|
+
import "./cljs-runtime/shadow.esm.esm_import$rehype_parse.js";
|
|
104
|
+
SHADOW_ENV.setLoaded("shadow.esm.esm_import$rehype_parse.js");
|
|
105
|
+
import "./cljs-runtime/shadow.esm.esm_import$rehype_remark.js";
|
|
106
|
+
SHADOW_ENV.setLoaded("shadow.esm.esm_import$rehype_remark.js");
|
|
105
107
|
import "./cljs-runtime/shadow.esm.esm_import$remark_parse.js";
|
|
106
108
|
SHADOW_ENV.setLoaded("shadow.esm.esm_import$remark_parse.js");
|
|
107
109
|
import "./cljs-runtime/shadow.esm.esm_import$remark_stringify.js";
|