uesteibar / hyperdocs

(UNSUPPORTED) Get docs right in your hyper terminal.
https://www.npmjs.com/package/hyperdocs
Other
13 stars 7 forks source link

Calling "hyperdocs react" freezes.. Invalid regular expression Error #11

Closed michaelwayman closed 6 years ago

michaelwayman commented 6 years ago

Expected Behavior

hyperdocs react should take me to the react docs

Current Behavior

The plugin hands and the developer tools says

Uncaught SyntaxError: Invalid regular expression: /(?<=hyperdocs).*/: Invalid group
    at /Users/me/.hyper_plugins/node_modules/hyperdocs/lib/index.js:67:54

Possible Solution

Fix the regular expression

Steps to Reproduce (for bugs)

Type hyperdocs python into terminal.

Context

Your Environment

Plugins

uesteibar commented 6 years ago

thanks @michaelwayman for reporting this! I'll look into it as soon as possible :)

ryuheechul commented 6 years ago

having the same issue and looking forward to get a patch!

andretf commented 6 years ago

/(?<=hyperdocs).*/.exec(data)[0].split(']')[0].trim()

?<= is not a valid Regular Expression for Javascript. I guess hyperdocs command had not being found before, therefore branch of code never been reached.

uesteibar commented 6 years ago

Thanks for having a look into this @andretf, will try to have a look next week and have a fix ready.

Sorry for the delay guys, I've been out for a while :)