Closed drewr closed 7 years ago
es-mode does already support comments, it just uses the javascript-like //
as the comment character.
There's an issue open to change it to #
to match Kibana's behavior: https://github.com/dakrone/es-mode/issues/40
Whoops, missed that. We don't need this one then!
Here at Elastic HQ we have some training material that has a bunch of requests in one file with comments scattered about. It mainly causes a problem with determining the end of a request's payload which currently es-mode does by looking for the next request verb or the end of a JSON doc. We should also stop on leading
#
. Maybe even get fancy and support#
in other places, but that would require some parsing of the payload etc.Example:
This fails because es-mode can't determine where the body for
GET /foo/_search
ends. This works though: