Browse files

Merge pull request #51 from kevinfahy/master

Explicit ending tags for <section>, <aside>, and others
  • Loading branch information...
2 parents f0d5221 + c7dd5cb commit fcd6668cd6ce0dd9f24cf4902f3a90e601631238 @weavejester weavejester committed May 22, 2012
Showing with 6 additions and 4 deletions.
  1. +4 −3 src/hiccup/compiler.clj
  2. +2 −1 test/hiccup/test/core.clj
@@ -36,9 +36,10 @@
(def ^{:doc "A list of elements that need an explicit ending tag when rendered."
:private true}
- #{"a" "b" "body" "canvas" "dd" "div" "dl" "dt" "em" "fieldset" "form" "h1" "h2" "h3"
- "h4" "h5" "h6" "head" "html" "i" "iframe" "label" "li" "ol" "option" "pre"
- "script" "span" "strong" "style" "table" "textarea" "title" "ul"})
+ #{"a" "article" "aside" "b" "body" "canvas" "dd" "div" "dl" "dt" "em" "fieldset"
+ "footer" "form" "h1" "h2" "h3" "h4" "h5" "h6" "head" "header" "hgroup" "html"
+ "i" "iframe" "label" "li" "nav" "ol" "option" "pre" "section" "script" "span"
+ "strong" "style" "table" "textarea" "title" "ul"})
(defn normalize-element
"Ensure an element vector is of the form [tag-name attrs content]."
@@ -25,7 +25,8 @@
(is (= (html [:text]) "<text />"))
(is (= (html [:a]) "<a></a>"))
(is (= (html [:iframe]) "<iframe></iframe>"))
- (is (= (html [:title]) "<title></title>")))
+ (is (= (html [:title]) "<title></title>"))
+ (is (= (html [:section]) "<section></section>")))
(testing "tags containing text"
(is (= (html [:text "Lorem Ipsum"]) "<text>Lorem Ipsum</text>")))
(testing "contents are concatenated"

0 comments on commit fcd6668

Please sign in to comment.