kibana/x-pack/plugins/grokdebugger/public/lib/ace/grok_mode.js
Shaunak Kashyap 84ae548b77 [Grok Debugger] Adding syntax highlighting for grok expressions (#18572)
* Adding basic syntax highlighting for grok expressions

* Use EUI color palette

* Handle regex tokens, escaped and unescaped

* Return token for escaped content

* Add functional test

* Using higher-contrast colors

* Removing comment I used for developing the highlight rules

* Using object destructuring

* Removing unnecessary method
2018-04-30 12:31:57 -07:00

17 lines
506 B
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import ace from 'ace';
import { GrokHighlightRules } from './grok_highlight_rules';
const TextMode = ace.acequire("ace/mode/text").Mode;
export class GrokMode extends TextMode {
constructor() {
super();
this.HighlightRules = GrokHighlightRules;
}
}