Skip to content

Commit

Permalink
Some tweaks for #144 close
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtaco committed Mar 17, 2015
1 parent 9a49129 commit e55a209
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

- Close #146: deferral variable with same name as a parameter in outer scope;
PR by @yjerem
- Close #144: Safer quoting of function names in debugging code.
PR by @sidthekidder
- Don't allow jison >= 0.4.14, until we patch up to CS 1.9

## v1.8.0-d (2015-03-01)

Expand Down
8 changes: 6 additions & 2 deletions lib/coffee-script/nodes.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"uglify-js": "~2.2",
"jison": ">=0.2.0",
"jison": ">=0.2.0 <=0.4.13",
"highlight.js": "~8.0.0",
"underscore": "~1.5.2",
"docco": "~0.6.2",
Expand Down
5 changes: 3 additions & 2 deletions src/nodes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2584,8 +2584,9 @@ quote_path_for_emission = (n) ->
# paths. See Issue #84. Thanks to @Deathspike for this patch
'"' + n.replace(/\\/g, '\\\\') + '"'

remove_quotes = (n) ->
quote_funcname_for_debug = (n) ->
# Remove all single and double quotes to make the emitted funcname safe
# See issue #144. Thanks to @sidthekidder for this patch.
'"' + n.replace(/["']/g, '') + '"'

require_top_dir = () ->
Expand Down Expand Up @@ -2623,7 +2624,7 @@ exports.Await = class Await extends Base

if n = @parentFunc?.icedTraceName()
func_lhs = new Value new Literal iced.const.funcname
func_rhs = new Value new Literal remove_quotes n
func_rhs = new Value new Literal quote_funcname_for_debug n
func_assignment = new Assign func_lhs, func_rhs, "object"
assignments.push func_assignment

Expand Down

0 comments on commit e55a209

Please sign in to comment.