klorenz / atom-regex-railroad-diagrams

display regex as railroad diagram, if cursor moves to it
MIT License
250 stars 31 forks source link

Regex expression gets truncated in ECMAScript during parsing #57

Closed timnew closed 9 years ago

timnew commented 9 years ago

I have the following code in a ES6 code.

const DEFAULT_PATTERN = /([a-zA-Z]{2,5})-?(\d{3,5})/g;

But the plugin doesn't recognize my regex correctly, it says:

/([a-zA-Z]{2,5})-?(\d{3,5}
                          ^
                          Expected "$", "(", ")", ".", "\\", "\\0", "\\A", "\\B", "\\D", "\\G", "\\S", "\\W", "\\Z", "\\b", "\\c", "\\d", "\\f", "\\n", "\\r", "\\s", "\\t", "\\u", "\\v", "\\w", "\\x", "\\z", "|", CharacterSet or Literal but end of input found.
klorenz commented 9 years ago

This is fixed in 0.9