Skip to content

Instantly share code, notes, and snippets.

@wilf312
Created October 25, 2013 05:57
Show Gist options
  • Save wilf312/7150019 to your computer and use it in GitHub Desktop.
Save wilf312/7150019 to your computer and use it in GitHub Desktop.
CoffeeScriptでヒアドキュメントで変数展開させる ref: http://qiita.com/wilf312/items/1476ec927df22bab5392
insert = '展開したいテキスト'
# 出力 → ここに展開したいテキストをいれます。
ex1 = """
ここに#{insert}をいれます。
"""
console.log(ex1);
# 出力 → ここには#{insert}入りません。
ex2 = '''
ここには#{insert}入りません。
'''
console.log(ex2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment