@clevertask/scribe 0.0.4 → 0.0.5

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.
@@ -1,10 +1,34 @@
1
- import { T as r, p as t } from "../turndown.browser.es-BSoGafvq.js";
2
- const o = (e) => new r({
3
- headingStyle: "atx",
4
- hr: "---",
5
- bulletListMarker: "-",
6
- codeBlockStyle: "fenced"
7
- }).turndown(t.sanitize(e));
1
+ import { T as o, p as i } from "../turndown.browser.es-BSoGafvq.js";
2
+ const u = (a) => {
3
+ const e = new o({
4
+ headingStyle: "atx",
5
+ hr: "---",
6
+ bulletListMarker: "-",
7
+ codeBlockStyle: "fenced"
8
+ });
9
+ e.addRule("latex", {
10
+ filter: function(t) {
11
+ return t.nodeName === "SPAN" && t.getAttribute("data-type") === "latex";
12
+ },
13
+ replacement: function(t, n) {
14
+ const r = n.getAttribute("data-content") || "";
15
+ return n.getAttribute("data-display-mode") === "true" ? `
16
+
17
+ $$
18
+ ${r}
19
+ $$
20
+
21
+ ` : `$${r}$`;
22
+ }
23
+ }), e.addRule("strikethrough", {
24
+ filter: ["del", "s"],
25
+ replacement: function(t) {
26
+ return "~~" + t + "~~";
27
+ }
28
+ });
29
+ const c = (t) => t.replace(/<span([^>]+data-type="latex"[^>]*)><\/span>/g, "<span$1>•</span>");
30
+ return e.turndown(i.sanitize(c(a)));
31
+ };
8
32
  export {
9
- o as html2md
33
+ u as html2md
10
34
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A Tiptap-based rich text editor with a Notion-style block interface for viewing and creating content. Perfect for diverse needs like notes, documents, AI chat, Markdown parsing, and comments.",
4
4
  "author": "CleverTask",
5
5
  "private": false,
6
- "version": "0.0.4",
6
+ "version": "0.0.5",
7
7
  "type": "module",
8
8
  "main": "dist/main.js",
9
9
  "types": "dist/main.d.ts",
@@ -87,6 +87,7 @@
87
87
  "@tiptap/extension-table-row": "^2.11.7",
88
88
  "@tiptap/extension-task-item": "^2.11.7",
89
89
  "@tiptap/extension-task-list": "^2.11.7",
90
+ "@tiptap/extension-typography": "^2.11.7",
90
91
  "@tiptap/pm": "^2.11.7",
91
92
  "@tiptap/react": "^2.11.7",
92
93
  "@tiptap/starter-kit": "^2.11.7",