-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 🐛 fix break lines issue in markdown parser (#24)
- Loading branch information
1 parent
e80a61a
commit 0dea318
Showing
4 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/BuildingBlocks/SpectreConsole/Markdown/SpectreHorizontalCompositeRenderable.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Spectre.Console; | ||
using Spectre.Console.Rendering; | ||
|
||
namespace BuildingBlocks.SpectreConsole.Markdown; | ||
|
||
// Stacking elements vertically or adding multiple horizontal rows without extra space | ||
internal class SpectreHorizontalCompositeRenderable(IEnumerable<IRenderable> renderablesElements) : Renderable | ||
{ | ||
protected override IEnumerable<Segment> Render(RenderOptions options, int maxWidth) | ||
{ | ||
// Use Rows to combine renderables items in multiple horizontal rows without extra space | ||
IRenderable rows = new Rows(renderablesElements); | ||
return rows.Render(options, maxWidth); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters