Skip to content

Commit ca36041

Browse files
authored
Merge pull request #9082 from streetwriters/fix/checklist-txt-export
Fix check list text export
2 parents 50d0827 + 924eaf8 commit ca36041

File tree

3 files changed

+67
-2
lines changed

3 files changed

+67
-2
lines changed

packages/core/src/content-types/__tests__/__snapshots__/tiptap.test.js.snap

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
22

3+
exports[`convert HTML to markdown with callout > html-to-md-callout.md 1`] = `
4+
"<div data-block-id="rhV2uFhw" data-callout-type="success" class="callout"><h4 data-block-id="bFvPV3Vx">Hello world</h4><p data-block-id="5p4vIFMh" data-spacing="double">kjsbva</p><p data-block-id="ltfvam7i" data-spacing="double">vadvkjabsdv</p><p data-block-id="bGYLgeJA" data-spacing="double">dvjkasbdv</p></div>
5+
6+
adsvjkabsdv
7+
8+
advjakbsdv
9+
10+
11+
12+
"
13+
`;
14+
15+
exports[`convert HTML to markdown with checklist > html-to-md-checklist.md 1`] = `
16+
"oeee
17+
18+
- [ ] 123
19+
20+
- [x] 123
21+
22+
- [ ] 13123
23+
24+
- [ ] 123123
25+
26+
- [ ] dskjvdskbv
27+
28+
- [ ] sdvkjsdv
29+
30+
- [ ] dsv
31+
32+
- [ ] 123123
33+
34+
"
35+
`;
36+
337
exports[`convert HTML to markdown with codeblock2 > html-to-md-codeblock2.md 1`] = `
438
"\`\`\`
539
hello
@@ -250,6 +284,35 @@ Nene
250284
"
251285
`;
252286
287+
exports[`convert HTML to text with callout > html-to-txt-callout.txt 1`] = `
288+
"HELLO WORLD
289+
290+
kjsbva
291+
292+
vadvkjabsdv
293+
294+
dvjkasbdv
295+
296+
adsvjkabsdv
297+
298+
advjakbsdv
299+
300+
301+
"
302+
`;
303+
304+
exports[`convert HTML to text with checklist > html-to-txt-checklist.txt 1`] = `
305+
"oeee
306+
☐ 123
307+
✅ 123
308+
☐ 13123
309+
☐ 123123
310+
☐ dskjvdskbv
311+
☐ sdvkjsdv
312+
☐ dsv
313+
☐ 123123"
314+
`;
315+
253316
exports[`convert HTML to text with codeblock2 > html-to-txt-codeblock2.txt 1`] = `
254317
"hello
255318
"

packages/core/src/content-types/__tests__/tiptap.test.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/src/content-types/tiptap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ function convertHtmlToTxt(html: string, wrap = true) {
388388
selectors: [
389389
{ selector: "table", format: "dataTable" },
390390
{ selector: "ul.checklist", format: "taskList" },
391-
{ selector: "ul.simple-checklist", format: "checkList" },
391+
{ selector: "ul.simple-checklist", format: "taskList" },
392392
{ selector: "p", format: "paragraph" },
393393
{ selector: `a[href^="nn://"]`, format: "internalLink" }
394394
],

0 commit comments

Comments
 (0)