Skip to content

Commit 1027344

Browse files
coenttbgithub-actions[bot]
authored andcommitted
Run swift-format
1 parent 27d887c commit 1027344

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

Sources/HTML/HTML Enhancements/HTMLColor.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ extension DarkModeColor {
3030
private typealias sRGB = IEC_61966.`2`.`1`.sRGB
3131

3232
/// Calculates the midpoint color between two colors for gradients
33-
public static func gradientMidpoint(from color1: DarkModeColor, to color2: DarkModeColor) -> DarkModeColor? {
33+
public static func gradientMidpoint(
34+
from color1: DarkModeColor,
35+
to color2: DarkModeColor
36+
) -> DarkModeColor? {
3437
func midpoint(
3538
_ c1: CSS_Standard.Color.Value,
3639
_ c2: CSS_Standard.Color.Value
@@ -56,7 +59,8 @@ extension DarkModeColor {
5659
return .init(.hex("000000"))
5760
}
5861
// Perceived brightness using ITU-R BT.601 coefficients
59-
let brightness = (Double(srgb.r255) * 299 + Double(srgb.g255) * 587 + Double(srgb.b255) * 114) / 255000
62+
let brightness =
63+
(Double(srgb.r255) * 299 + Double(srgb.g255) * 587 + Double(srgb.b255) * 114) / 255000
6064
let color: CSS_Standard.Color.Value = brightness > 0.5 ? .hex("000000") : .hex("FFFFFF")
6165
return .init(color)
6266
}

Sources/HTML/exports.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
// Created by Coen ten Thije Boonkkamp on 01/09/2024.
66
//
77

8-
@_exported import Color_Standard
98
@_exported import CSS
109
@_exported import CSS_Standard
10+
@_exported import Color_Standard
1111
@_exported import HTML_Rendering
1212
@_exported import HTML_Standard
1313
@_exported import Markdown_HTML_Rendering

Tests/HTML Tests/InlineSVG Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import Foundation
99
import HTML
10-
import StandardsTestSupport
1110
import SVG
1211
import SVG_Standard
12+
import StandardsTestSupport
1313
import Testing
1414

1515
@testable import HTML

Tests/HTML Tests/Support/Snapshots.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// Created by Coen ten Thije Boonkkamp on 22/12/2025.
66
//
77

8-
import StandardsTestSupport
98
import InlineSnapshotTesting
9+
import StandardsTestSupport
1010

1111
extension Test {
1212
@MainActor

0 commit comments

Comments
 (0)