Created
March 3, 2015 17:14
-
-
Save cap10morgan/03a7c61dfe6f389b4471 to your computer and use it in GitHub Desktop.
hbs bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns hbs-test.core | |
(:require [hbs.core :refer :all] | |
[hbs.helper :refer :all]) | |
(:gen-class)) | |
(def broken-template | |
"Hello, World! | |
{{#parent}} | |
{{child}} says hi too. | |
{{/parent}}") | |
(def working-template | |
"Hello, World! | |
{{#with parent}} | |
{{child}} says hi too. | |
{{/with}}") | |
(defn render-template | |
[template] | |
(render template | |
{:parent {:child "The kid"}})) | |
(defn -main | |
[& args] | |
(println "Broken template:\n\n" (render-template broken-template)) | |
(println "Working template:\n\n" (render-template working-template))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment