Skip to content

Commit

Permalink
Pass model in highlight helper
Browse files Browse the repository at this point in the history
Pass model to callback of highlight helper for consistency with layout helper.
  • Loading branch information
debackerl committed Jan 3, 2016
1 parent 3e352f1 commit aeca578
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helpers/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ helpers.highlight = function(lang, cb){

// cb() is simply a user-defined function. It could (and should) contain
// buffer additions, so we call it...
cb();
cb( this.model );

// ... and then use fromMark() to grab the output added by cb().
var cbOutLines = this.buffer.fromMark(startMark);
Expand All @@ -35,4 +35,4 @@ helpers.highlight = function(lang, cb){

// returning is allowed, but could cause surprising effects. A return
// value will be directly added to the output directly following the above.
}
}

0 comments on commit aeca578

Please sign in to comment.