From 0dd9aa3c8bcff0c95e0ca37ba833d6401ded6534 Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sun, 16 Nov 2014 01:43:46 +0000 Subject: [PATCH] Use triple quotes --- src/VirtualDOM/VTree.purs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/VirtualDOM/VTree.purs b/src/VirtualDOM/VTree.purs index cd668c9..923d81d 100644 --- a/src/VirtualDOM/VTree.purs +++ b/src/VirtualDOM/VTree.purs @@ -25,22 +25,24 @@ type Namespace = String foreign import unsafeNull "var unsafeNull = null;" :: forall a. a -foreign import vnode' - "var vnode$prime = (function() {\ - \ var VNode = require('vtree/vnode');\ - \ return function (name, props, children, key, ns) {\ - \ return new VNode(name, props, children, key, ns);\ - \ };\ - \}());" :: forall props. Fn5 TagName { | props } [VTree] Key Namespace VTree +foreign import vnode' """ + var vnode$prime = (function() { + var VNode = require('vtree/vnode'); + return function (name, props, children, key, ns) { + return new VNode(name, props, children, key, ns); + }; + }()); + """ :: forall props. Fn5 TagName { | props } [VTree] Key Namespace VTree vnode :: forall props. TagName -> { | props } -> [VTree] -> Maybe Key -> Maybe Namespace -> VTree vnode name props children key ns = runFn5 vnode' name props children (fromMaybe unsafeNull key) (fromMaybe unsafeNull ns) -foreign import vtext - "var vtext = (function() {\ - \ var VText = require('vtree/vtext');\ - \ return function (text) {\ - \ return new VText(text);\ - \ };\ - \}());" :: String -> VTree +foreign import vtext """ + var vtext = (function() { + var VText = require('vtree/vtext'); + return function (text) { + return new VText(text); + }; + }()); + """ :: String -> VTree