Skip to content

Commit

Permalink
Fix string interpolation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
teliosdev committed Mar 24, 2014
1 parent 5394c91 commit 821027b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions lib/liquidscript/compiler/icr/literals.rb
Expand Up @@ -112,8 +112,12 @@ def compile_istring_begin

loop do
contents << compile_vexpression
contents << shift(:istring)
peek?(:istring_begin)
if peek?(:istring_begin)
contents << shift(:istring_begin)
else
contents << shift(:istring)
false
end
end


Expand Down
2 changes: 1 addition & 1 deletion lib/liquidscript/version.rb
@@ -1,5 +1,5 @@
module Liquidscript

# The current version of liquidscript.
VERSION = "0.7.8".freeze
VERSION = "0.7.9".freeze
end
4 changes: 2 additions & 2 deletions spec/fixtures/string.generate.yml
Expand Up @@ -3,11 +3,11 @@ data: |
foo = 'world
thing = "hello \" test
world"
interop = "hello #{foo}"
interop = "hello #{foo} #{test}"
compiled: |
var test, foo, thing, interop;
test = "hello";
foo = 'world';
thing = "hello \" test \n world";
interop = "hello" + (foo) + "";
interop = "hello" + (foo) + " " + (test) + "";

0 comments on commit 821027b

Please sign in to comment.