Skip to content

Instantly share code, notes, and snippets.

@owensd

owensd/h1.swift Secret

Created April 6, 2017 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owensd/93fe0eaa20321b971e926f85c069a839 to your computer and use it in GitHub Desktop.
Save owensd/93fe0eaa20321b971e926f85c069a839 to your computer and use it in GitHub Desktop.
public func h1(_ attributes: [String:String]) -> ([HtmlElement]) -> HtmlElement {
return { content in return HtmlElement.Node(tagName: "h1", attributes: attributes, content: content) }
}
public func h1(_ attributes: [String:String], _ content: [HtmlElement]) -> HtmlElement {
return h1(attributes)(content)
}
public func h1(_ content: [HtmlElement]) -> HtmlElement {
return h1([:], content)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment