Skip to content

Commit db0d0de

Browse files
committed
refactor(ui): remove FormattedText class from MarkdownRenderer
- Remove FormattedText class from MarkdownRenderer - Use the new FormattedText object instead Commit generated by The Saturn Pipeline
1 parent e995c0a commit db0d0de

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

UI/MarkdownRenderer.cs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.Text;
44
using System.Text.RegularExpressions;
5+
using Saturn.UI.Objects;
56
using Terminal.Gui;
67

78
namespace Saturn.UI
@@ -188,29 +189,4 @@ public FormattedText RenderToFormattedText(string markdown)
188189
return formattedText;
189190
}
190191
}
191-
192-
public class FormattedText
193-
{
194-
private List<(string text, Terminal.Gui.Attribute attribute)> segments = new();
195-
196-
public void Add(string text, Terminal.Gui.Attribute attribute)
197-
{
198-
segments.Add((text, attribute));
199-
}
200-
201-
public List<(string text, Terminal.Gui.Attribute attribute)> GetSegments()
202-
{
203-
return segments;
204-
}
205-
206-
public override string ToString()
207-
{
208-
var sb = new StringBuilder();
209-
foreach (var segment in segments)
210-
{
211-
sb.Append(segment.text);
212-
}
213-
return sb.ToString();
214-
}
215-
}
216192
}

0 commit comments

Comments
 (0)