Skip to content

Commit

Permalink
fixes jashkenas#1721: CDATA support in text/coffeescript <script> tags
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Oct 21, 2011
1 parent d359764 commit be6e4ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extras/coffee-script.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions lib/coffee-script/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/browser.coffee
Expand Up @@ -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

Expand Down

0 comments on commit be6e4ca

Please sign in to comment.