Skip to content

Commit

Permalink
feat: allow flags to be specified
Browse files Browse the repository at this point in the history
  • Loading branch information
w33ble committed Apr 18, 2018
1 parent af72400 commit d4e97b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Handlebars.registerHelper('json', function (object) {
})

Handlebars.registerHelper('matches', function (val, pattern, options) {
const r = new RegExp(pattern)
const r = new RegExp(pattern, options.hash.flags || '')
return r.test(val) ? options.fn(this) : options.inverse(this)
})

Expand Down

0 comments on commit d4e97b6

Please sign in to comment.