mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* 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
17 lines
506 B
JavaScript
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;
|
|
}
|
|
}
|