Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
nicer names for options
Browse files Browse the repository at this point in the history
  • Loading branch information
piranha committed Apr 2, 2013
1 parent 333bcf0 commit 912d2ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/tokenizer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ _ = require 'underscore'


tokenize = (source, options={}) ->
options = _.extend {begin: '<%', end: '%>', moreTokenNames: {}}, options
tokenNames = _.extend {}, defaultTokenNames, options.moreTokenNames
options = _.extend {begin: '<%', end: '%>', tokenNames: {}}, options
tokenNames = _.extend {}, defaultTokenNames, options.tokenNames
BEGIN = options.begin
END = options.end

Expand Down
4 changes: 2 additions & 2 deletions src/transformer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ getWriter = ->


transform = (tokens, options) ->
options = _.extend({helpers: {}, helpersName: 'helpers', moreTokenMap: {}},
options = _.extend({helpers: {}, helpersName: 'helpers', tokenMap: {}},
options)
tokenMap = _.extend({}, getDefaultTokenMap(options.helpersName),
options.moreTokenMap)
options.tokenMap)

writer = getWriter()
writer.write '(ctx) ->', indent: true
Expand Down

0 comments on commit 912d2ad

Please sign in to comment.