mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Convert OnigRegExp from a v8 extension to a window binding
This commit is contained in:
committed by
Kevin Sawicki
parent
74d7d48dcc
commit
2946ba7b9a
10
src/stdlib/onig-reg-exp.coffee
Normal file
10
src/stdlib/onig-reg-exp.coffee
Normal file
@@ -0,0 +1,10 @@
|
||||
class window.OnigRegExp
|
||||
constructor: (source) ->
|
||||
regexp = $onigRegExp.buildOnigRegExp(source);
|
||||
regexp.constructor = OnigRegExp
|
||||
regexp.__proto__ = OnigRegExp.prototype
|
||||
regexp.source = source
|
||||
return regexp
|
||||
|
||||
search: $onigRegExp.search
|
||||
test: $onigRegExp.test
|
||||
Reference in New Issue
Block a user