Skip to content

Releases: pointfreeco/swift-html

0.4.1

27 May 16:58
be9d301
Compare
Choose a tag to compare

What's Changed

  • Fixed: Support wrapping dt and dd elements in div (thanks @nkalvi, #95).
  • Infrastructure: Update README (#86), modernize package to swift-tools 5.5. by @mbrandonw in #96; CI updates (thanks @nkalvi, #98); typo fixes (thanks @qmoya, #99).

New Contributors

Full Changelog: 0.4.0...0.5.0

0.4.0

17 Aug 20:01
f53c38c
Compare
Choose a tag to compare
  • Added: Support for viewport-fit (thanks @hallee).
  • Added: Support for the accept attribute (thanks @xavierLowmiller).
  • Added: an experimental rendered for XML, _xmlRender. It is prefixed with an underscore for now. It renders valid XML and avoids rendering "void" (non-closing) HTML tags.
  • Changed: the package has been renamed to swift-html to match Apple conventions.
  • Fixed: srcset is now rendered in a stable order.
  • Removed: support for Carthage and CocoaPods. If you depend on these package managers, you must pin to an older version than 0.4.0.

0.3.1

31 Mar 17:43
3ffc3fc
Compare
Choose a tag to compare

This minor release restores support for Swift 4.2!

0.3.0

26 Mar 14:35
Compare
Choose a tag to compare

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!

-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).

0.2.1

05 Feb 01:01
b1b59b3
Compare
Choose a tag to compare

Fixed a typo where onkeydown was mistakenly rendered as onkeyup. #35

0.2.0

08 Jan 17:17
513bc70
Compare
Choose a tag to compare

What's new?

  • Support for Carthage and CocoaPods
  • A brand new module, HtmlSnapshotTesting for testing your HTML using SnapshotTesting
  • A new debugRender function, which renders HTML with human-readable indentation
  • Support for iOS, tvOS, and watchOS
  • Added a missing style(unsafe:) attribute helper that takes non-static strings
  • Added a missing enctype form attribute helper

What's fixed?

  • Fixed thead and tbody element helpers to require nesting in a table

0.1.3

13 Oct 23:29
fc87a0b
Compare
Choose a tag to compare
0.1.3 Pre-release
Pre-release

This release fixes how empty, non-void elements are closed.

0.1.2

11 Oct 19:30
2580768
Compare
Choose a tag to compare
0.1.2 Pre-release
Pre-release
Make a few helper functions and values public. (#6)

* Make a few helper functions and values public.

* More escaping helpers.

0.1.1

13 Sep 02:12
bb2fac7
Compare
Choose a tag to compare
0.1.1 Pre-release
Pre-release
Merge pull request #2 from pointfreeco/escaping-verification

Pin swift-snapshot-testing, and added a test

0.1.0

12 Sep 12:06
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

Today we are open sourcing a new library for building HTML documents in Swift. It鈥檚 extensible, transformable, type-safe, and provides many benefits over templating languages.

Read more here!