Download Latest Version 0.5.0 source code.zip (69.3 kB)
Email in envelope

Get an email when there's a new version of swift-html

Home / 0.3.0
Name Modified Size InfoDownloads / Week
Parent folder
0.3.0.tar.gz 2019-03-26 69.7 kB
0.3.0.zip 2019-03-26 92.7 kB
README.md 2019-03-26 1.1 kB
Totals: 3 Items   163.6 kB 0

What's new?

  • Swift 5 support (#51).
  • The element and attribute APIs have been completely revamped to use statics (#39).
  • The underlying Node API has been improved!
    • Arrays of nodes are now contained within a .fragment case, and .element has been updated to take a single child node, which may be a fragment (#23).
    • Node is now ExpressibleByArrayLiteral (#23).
    • Node is now Equatable and Hashable (#48).
    • Node now supports Swift 5 ExpressibleByStringInterpolation (#48).
  • The mailto API has been improved to take subject and other parameters (#41).
  • There's a new template tag helper (#43).

The cumulative changes make for a big difference in API, but we think it's worth it!

:::diff
-let link: Node = a([href("/")], ["Hello, ", .text(name), "!"])
+let link: Node = .a(attributes: [.href("/")], "Hello, \(name)!")

What's fixed?

  • Both summary/details and fieldset/legend have been fixed to compile correctly (#42).
  • The HtmlSnapshotTesting module has been fixed on Carthage by disabling bit-code (#49).
Source: README.md, updated 2019-03-26