diff --git a/Sources/Elementary/Core/Html+Attributes.swift b/Sources/Elementary/Core/Html+Attributes.swift
index 816071d..d061536 100644
--- a/Sources/Elementary/Core/Html+Attributes.swift
+++ b/Sources/Elementary/Core/Html+Attributes.swift
@@ -26,7 +26,11 @@ public struct HTMLAttributeMergeAction: Sendable {
public static var ignoring: Self { .init(mergeMode: .ignoreIfSet) }
/// Appends the new value to the existing value, separated by the specified string.
+ @available(*, deprecated, renamed: "appending(separatedBy:)")
public static func appending(seperatedBy: String) -> Self { .init(mergeMode: .appendValue(seperatedBy)) }
+
+ /// Appends the new value to the existing value, separated by the specified string.
+ public static func appending(separatedBy: String) -> Self { .init(mergeMode: .appendValue(separatedBy)) }
}
public extension HTMLAttribute {
diff --git a/Sources/Elementary/HtmlAttributes.swift b/Sources/Elementary/HtmlAttributes.swift
index 375561e..18a2e00 100644
--- a/Sources/Elementary/HtmlAttributes.swift
+++ b/Sources/Elementary/HtmlAttributes.swift
@@ -12,7 +12,7 @@ public extension HTMLAttribute where Tag: HTMLTrait.Attributes.Global {
}
static func `class`(_ value: String) -> Self {
- HTMLAttribute(name: "class", value: value, mergedBy: .appending(seperatedBy: " "))
+ HTMLAttribute(name: "class", value: value, mergedBy: .appending(separatedBy: " "))
}
static func data(_ key: String, value: String) -> Self {
@@ -20,7 +20,7 @@ public extension HTMLAttribute where Tag: HTMLTrait.Attributes.Global {
}
static func style(_ value: String) -> Self {
- HTMLAttribute(name: "style", value: value, mergedBy: .appending(seperatedBy: ";"))
+ HTMLAttribute(name: "style", value: value, mergedBy: .appending(separatedBy: ";"))
}
static func title(_ value: String) -> Self {
diff --git a/Tests/ElementaryTests/AttributeRenderingTests.swift b/Tests/ElementaryTests/AttributeRenderingTests.swift
index b490980..af4946d 100644
--- a/Tests/ElementaryTests/AttributeRenderingTests.swift
+++ b/Tests/ElementaryTests/AttributeRenderingTests.swift
@@ -61,9 +61,9 @@ final class AttributeRenderingTests: XCTestCase {
func testRespectsCustomMergeMode() async throws {
try await HTMLAssertEqual(
br(.id("1"), .data("bar", value: "baz"))
- .attributes(.id("2").mergedBy(.appending(seperatedBy: "-")))
+ .attributes(.id("2").mergedBy(.appending(separatedBy: "-")))
.attributes(.id("3").mergedBy(.ignoring))
- .attributes(.data("bar", value: "baq").mergedBy(.appending(seperatedBy: ""))),
+ .attributes(.data("bar", value: "baq").mergedBy(.appending(separatedBy: ""))),
#"
"#
)
}