File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ module.exports = function markdown(config) {
40
40
}
41
41
42
42
var md = new Remarkable ( options ) ;
43
- var ctx = merge ( { } , options , this . context , context ) ;
43
+ var ctx = merge ( { } , options , this , context ) ;
44
44
return md . render ( options . fn ( ctx ) ) ;
45
45
}
46
46
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ describe('sync', function() {
50
50
describe ( 'handlebars:' , function ( ) {
51
51
it ( 'should work as a handlebars helper:' , function ( ) {
52
52
handlebars . registerHelper ( 'markdown' , markdown ( { highlight : highlight } ) ) ;
53
- handlebars . compile ( '{{#markdown}}# heading{{ /markdown}}' ) ( ) . should . equal ( '<h1>heading</h1>\n' ) ;
53
+ handlebars . compile ( '{{#markdown}}# {{title}}{{ /markdown}}' ) ( { title : 'heading' } ) . should . equal ( '<h1>heading</h1>\n' ) ;
54
54
} ) ;
55
55
56
56
it ( 'should pass hash options to remarkable:' , function ( ) {
@@ -81,7 +81,7 @@ describe('sync', function() {
81
81
describe ( 'lodash:' , function ( ) {
82
82
it ( 'should work as a lodash mixin:' , function ( ) {
83
83
_ . mixin ( { markdown : markdown } ) ;
84
- _ . template ( '<%= _.markdown("# heading" ) %>' ) ( { } ) . should . equal ( '<h1>heading</h1>\n' ) ;
84
+ _ . template ( '<%= _.markdown("# " + title ) %>' ) ( { title : 'heading' } ) . should . equal ( '<h1>heading</h1>\n' ) ;
85
85
} ) ;
86
86
87
87
it ( 'should pass options to remarkable:' , function ( ) {
You can’t perform that action at this time.
0 commit comments