klorenz / atom-regex-railroad-diagrams

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

Check strings for escaped regex #70

Closed baelter closed 7 years ago

baelter commented 8 years ago

Would be nice if strings where unescaped and checked for regex type.

e.g. regex in json string.

klorenz commented 8 years ago

Hi Anders,

I do not know exactly what you mean. JSON does not know regexes. Do you think of syntax highlight descriptions? If so, please take a look at another package of mine, which you can use for writing coffeescript or javascript and generate the syntax theme from it: https://www.npmjs.com/package/atom-syntax-tools

Best regards, Kiwi

Am 22.04.2016 um 20:26 schrieb Anders Bälter:

Would be nice if strings where unescaped and checked for regex type.

e.g. regex in json string.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/klorenz/atom-regex-railroad-diagrams/issues/70

baelter commented 8 years ago
{
  "var" : "^.*\\d+§"
}

escaped regex in strings like this.

edgerunner commented 7 years ago

I think there would be a lot of cases where a regex in a string would be very hard to tell apart from a regular string, and vice versa.

A better solution may be the ability to invoke the diagram manually (via a keyboard shortcut or menu command) in which case it could evaluate a string literal as regex.

baelter commented 7 years ago

Agree