text-doc-ir 0.3.1 → 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.
Files changed (2) hide show
  1. package/dist/index.js +6 -5
  2. 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 }), e.visit({
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
- { type: "text", text: t.name },
491
- { type: "break" },
492
+ ...s,
492
493
  { type: "break" },
493
494
  ...t.content
494
495
  ]
495
496
  });
496
- for (const s of e.getLines())
497
- this.pushEndOfLineIfAnyContent(), this.lines[Math.max(0, this.lines.length - 1)] = "> " + s;
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "text-doc-ir",
3
- "version": "0.3.1",
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.0"
47
+ "document-ir": "0.5.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/bun": "latest",