gonzalezreal / swift-markdown-ui

Display and customize Markdown text in SwiftUI
MIT License
2.45k stars 302 forks source link

Implementation for .thematicBreak horizontal rule #49

Closed bigadz closed 2 years ago

bigadz commented 3 years ago

This PR adds macOS and iOS implementations for thematic breaks aka horizontal rules.

The Markdown parser already detects ---, ***, ___ on a single line and creates a .thematicBreak node.

However the AttributedStringRenderer currently renders this as an empty string.

The proposed new code renders a resizing horizontal rule that works well in dark and light modes. It has been tested on macOS and iOS.

itsthisjustin commented 1 month ago

Can this accept theme changes? It renders but has no padding around it unfortunately image