Permalink
Browse files

fixes #1721: CDATA support in text/coffeescript <script> tags

  • Loading branch information...
1 parent d359764 commit be6e4ca6d1f5b64e0b126e31c3995184bcbfa527 @michaelficarra michaelficarra committed Oct 21, 2011
Showing with 9 additions and 4 deletions.
  1. +1 −1 extras/coffee-script.js
  2. +4 −2 lib/coffee-script/browser.js
  3. +4 −1 src/browser.coffee
View

Large diffs are not rendered by default.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -43,7 +43,10 @@ runScripts = ->
if script.src
CoffeeScript.load script.src, execute
else
- CoffeeScript.run script.innerHTML
+ src = script.innerHTML
+ if match = src.match /^\s*<!\[CDATA\[([\S\s]*)]]>\s*$/
+ src = match[1]
+ CoffeeScript.run src
execute()
null

0 comments on commit be6e4ca

Please sign in to comment.