text-doc-ir 0.3.0 → 0.3.2
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/dist/index.js +7 -6
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -484,17 +484,18 @@ class c extends b {
|
|
|
484
484
|
quote(t) {
|
|
485
485
|
this.pushBlockContentBegin();
|
|
486
486
|
const e = new c(this.width - 2);
|
|
487
|
-
e.setState({ ...this.state, numericDepth: 0 })
|
|
487
|
+
e.setState({ ...this.state, numericDepth: 0 });
|
|
488
|
+
const s = t.author ? [{ type: "text", text: t.author }, { type: "break" }, { type: "text", text: t.name }, { type: "break" }] : [{ type: "text", text: t.name }, { type: "break" }];
|
|
489
|
+
e.visit({
|
|
488
490
|
type: "array",
|
|
489
491
|
content: [
|
|
490
|
-
|
|
491
|
-
{ type: "break" },
|
|
492
|
+
...s,
|
|
492
493
|
{ type: "break" },
|
|
493
494
|
...t.content
|
|
494
495
|
]
|
|
495
496
|
});
|
|
496
|
-
for (const
|
|
497
|
-
this.pushEndOfLineIfAnyContent(), this.lines[Math.max(0, this.lines.length - 1)] = "> " +
|
|
497
|
+
for (const n of e.getLines())
|
|
498
|
+
this.pushEndOfLineIfAnyContent(), this.lines[Math.max(0, this.lines.length - 1)] = "> " + n;
|
|
498
499
|
e.restoreState(this), this.pushBlockContentEnd();
|
|
499
500
|
}
|
|
500
501
|
bubble(t) {
|
|
@@ -555,7 +556,7 @@ class c extends b {
|
|
|
555
556
|
type: "text",
|
|
556
557
|
text: ` @${t.header.username}`
|
|
557
558
|
}] || [],
|
|
558
|
-
...t.header.
|
|
559
|
+
...t.header.usernameDomain && [{
|
|
559
560
|
type: "text",
|
|
560
561
|
text: `@${t.header.usernameDomain}`
|
|
561
562
|
}] || []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "text-doc-ir",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Transforms a document intermediate representation into plain text with formatting",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"to-text": "bun src/to-text.ts"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"document-ir": "0.5.
|
|
47
|
+
"document-ir": "0.5.4"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/bun": "latest",
|