| 731 | |
| 732 | it("should not leak styles into following lines when rendered in TUI", async () => { |
| 733 | class MarkdownWithInput implements Component { |
| 734 | public markdownLineCount = 0; |
| 735 | private readonly markdown: Markdown; |
| 736 | |
| 737 | constructor(markdown: Markdown) { |
| 738 | this.markdown = markdown; |
| 739 | } |
| 740 | |
| 741 | render(width: number): string[] { |
| 742 | const lines = this.markdown.render(width); |
| 743 | this.markdownLineCount = lines.length; |
| 744 | return [...lines, "INPUT"]; |
| 745 | } |
| 746 | |
| 747 | invalidate(): void { |
| 748 | this.markdown.invalidate(); |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | const markdown = new Markdown("This is thinking with `inline code`", 1, 0, defaultMarkdownTheme, { |
| 753 | color: (text) => chalk.gray(text), |
nothing calls this directly
no outgoing calls
no test coverage detected