diff options
author | Tom Willemse | 2014-07-25 22:27:41 +0200 |
---|---|---|
committer | Tom Willemse | 2014-07-25 22:27:41 +0200 |
commit | 2e6dcfd74ba08721048a6de000dc38becee213b6 (patch) | |
tree | 0c3dcff19a08ea9d498dbcfc24a9f6100ebb49e9 /hypo.hy | |
parent | e0158bc47b3eb73d2c772f567b8029d851f29118 (diff) | |
download | hypo-2e6dcfd74ba08721048a6de000dc38becee213b6.tar.gz hypo-2e6dcfd74ba08721048a6de000dc38becee213b6.zip |
Update hy to 0.10.0
Diffstat (limited to 'hypo.hy')
-rwxr-xr-x | hypo.hy | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -90,17 +90,17 @@ If no lexer is found fallback onto the text lexer." (let ((content (get (.commit-file repo ref filename) "data")) (lexer (get-lexer filename content)) (formatter (HtmlFormatter)) - (args {"file" filename "hash" hash})) + (kwargs {"file" filename "hash" hash})) (.update - args (if (in (get (os.path.splitext filename) 1) + kwargs (if (in (get (os.path.splitext filename) 1) [".png" ".jpg" ".jpeg" ".gif"]) - {"content" (kwapply (render.image) - {"name" filename - "hash" hash}) + {"content" (apply render.image [] + {"name" filename + "hash" hash}) "style" ""} {"content" (highlight content lexer formatter) "style" (formatter.get-style-defs ".highlight")})) - (kwapply (render.main) args)) + (apply render.main [] kwargs)) "")) (defun get-html [self name] @@ -129,10 +129,10 @@ If no lexer is found fallback onto the text lexer." (.write f (web.data))) (let ((repo (Gittle.init dirname))) (.stage repo [(str name)]) - (kwapply (repo.commit) - {"name" "Hypo" - "email" "hypo@ryuslash.org" - "message" "Initial commit"})) + (apply repo.commit [] + {"name" "Hypo" + "email" "hypo@ryuslash.org" + "message" "Initial commit"})) (setv web.ctx.status (str "201 Created")) (+ web.ctx.home "/" *prefix* (get h 0) "\n"))) |