diff --git a/examples/logo.rkt b/examples/logo.rkt index 3b150ca..48209f1 100644 --- a/examples/logo.rkt +++ b/examples/logo.rkt @@ -2,4 +2,8 @@ (require (planet dyoo/whalesong/image)) -(image-url "http://racket-lang.org/logo.png") + +(define lst + (list (image-url "http://racket-lang.org/logo.png") + (image-url "http://www.bootstrapworld.org/images/icon.gif"))) +(list lst lst) diff --git a/js-assembler/runtime-src/baselib-lists.js b/js-assembler/runtime-src/baselib-lists.js index 3bb17d6..7247b77 100644 --- a/js-assembler/runtime-src/baselib-lists.js +++ b/js-assembler/runtime-src/baselib-lists.js @@ -131,19 +131,19 @@ node.appendChild(document.createTextNode("(")); var p = this; while ( p instanceof Cons ) { - appendChild(node, plt.baselib.format.toDomNode(p.first, cache)); + node.appendChild(plt.baselib.format.toDomNode(p.first, cache)); p = p.rest; if ( p !== Empty.EMPTY ) { - appendChild(node, document.createTextNode(" ")); + node.appendChild(document.createTextNode(" ")); } if (typeof(p) === 'object' && cache.containsKey(p)) { break; } } if ( p !== Empty.EMPTY ) { - appendChild(node, document.createTextNode(".")); - appendChild(node, document.createTextNode(" ")); - appendChild(node, plt.baselib.format.toDomNode(p, cache)); + node.appendChild(document.createTextNode(".")); + node.appendChild(document.createTextNode(" ")); + node.appendChild(plt.baselib.format.toDomNode(p, cache)); } node.appendChild(document.createTextNode(")")); diff --git a/tests/more-tests/lists.expected b/tests/more-tests/lists.expected new file mode 100644 index 0000000..e2c66cf --- /dev/null +++ b/tests/more-tests/lists.expected @@ -0,0 +1,2 @@ +(1 2 3) +("hello" "world") diff --git a/tests/more-tests/lists.rkt b/tests/more-tests/lists.rkt new file mode 100644 index 0000000..0c482e4 --- /dev/null +++ b/tests/more-tests/lists.rkt @@ -0,0 +1,4 @@ +#lang planet dyoo/whalesong + +'(1 2 3) +(list "hello" "world") diff --git a/tests/run-more-tests.rkt b/tests/run-more-tests.rkt index 59935a7..272ee0d 100644 --- a/tests/run-more-tests.rkt +++ b/tests/run-more-tests.rkt @@ -14,3 +14,4 @@ (test "more-tests/man-vs-boy.rkt") (test "more-tests/colors.rkt") (test "more-tests/images.rkt") +(test "more-tests/lists.rkt") \ No newline at end of file