jorinvo / edn-data

EDN parser and generator that works with plain JS data, with support for TS and node streams
MIT License
96 stars 5 forks source link

Validate characters in keywords, symbols and tags #2

Open jorinvo opened 4 years ago

jorinvo commented 4 years ago

To generate valid EDN, we need to validate what characters are allowed in keywords and symbols when generating EDN.

They also must contain not more than one slash, which is not allowed to be the first or last char. And in the case of tags, they even must contain a slash if it's a custom tag provided by the user.

If invalid chars are given, throw an error.