Skip to content

Commit a20063b

Browse files
authored
Fix code block truncation (gonzalezreal#256)
* Fix unexpected code block truncation * Remove unused code * Update SnapshotTesting package
1 parent 5f977ba commit a20063b

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

Examples/Demo/Demo/ContentView.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ struct ContentView: View {
100100
}
101101
}
102102

103-
extension HorizontalAlignment {
104-
private struct RowTitleAlignment: AlignmentID {
105-
static func defaultValue(in context: ViewDimensions) -> CGFloat {
106-
context[HorizontalAlignment.leading]
107-
}
108-
}
109-
110-
static let rowTitleAligmentGuide = HorizontalAlignment(RowTitleAlignment.self)
111-
}
112-
113103
struct ContentView_Previews: PreviewProvider {
114104
static var previews: some View {
115105
ContentView()

Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MarkdownUI/Theme/Theme+Basic.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extension Theme {
8484
.codeBlock { configuration in
8585
ScrollView(.horizontal) {
8686
configuration.label
87+
.fixedSize(horizontal: false, vertical: true)
8788
.relativeLineSpacing(.em(0.15))
8889
.relativePadding(.leading, length: .rem(1))
8990
.markdownTextStyle {

Sources/MarkdownUI/Theme/Theme+DocC.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ extension Theme {
9696
.codeBlock { configuration in
9797
ScrollView(.horizontal) {
9898
configuration.label
99+
.fixedSize(horizontal: false, vertical: true)
99100
.relativeLineSpacing(.em(0.333335))
100101
.markdownTextStyle {
101102
FontFamilyVariant(.monospaced)

Sources/MarkdownUI/Theme/Theme+GitHub.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ extension Theme {
113113
.codeBlock { configuration in
114114
ScrollView(.horizontal) {
115115
configuration.label
116+
.fixedSize(horizontal: false, vertical: true)
116117
.relativeLineSpacing(.em(0.225))
117118
.markdownTextStyle {
118119
FontFamilyVariant(.monospaced)

0 commit comments

Comments
 (0)