Skip to content

Instantly share code, notes, and snippets.

@michaelschade
Created May 20, 2011 21:14
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 michaelschade/983816 to your computer and use it in GitHub Desktop.
Save michaelschade/983816 to your computer and use it in GitHub Desktop.
Skeleton comment function
-- | Comment combinator. `if` is included, so only condition is needed. E.g.,
--
-- > comment "lt IE 7"
comment :: String -> Html -> Html
comment cond = Parent "comment" (ss cond') "<![endif]-->"
where cond' = "<!--[if " ++ cond ++ " ]"
ss s = StaticString (s ++) (C8.pack s) (T.pack s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment