From fc2191fdde407e3d55e006eb96cab75bee1ca5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D4=9C=D0=B5=D1=95?= <5124946+wesinator@users.noreply.github.com> Date: Tue, 20 Nov 2018 16:34:12 +0000 Subject: [PATCH] Update CodeMirror mode (#986) --- extra/codemirror/yara.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extra/codemirror/yara.js b/extra/codemirror/yara.js index 8191b2d8..cb45425f 100644 --- a/extra/codemirror/yara.js +++ b/extra/codemirror/yara.js @@ -8,12 +8,12 @@ CodeMirror.defineMode("yara", function(config) { for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } - var keywords = words("all and any ascii at condition contains entrypoint false filesize for " + + var keywords = words("all and any ascii at condition contains entrypoint filesize for " + "fullword global import in include int16 int32 int8 matches meta " + - "nocase not of or private rule strings them true uint16 uint32 " + - "uint8 wide"); + "nocase not of or private rule strings them uint16 uint32 " + + "uint8 wide xor"); - var atoms = {"null": true}; + var atoms = {"true": true, "false": true}; var isOperatorChar = /[+\-*&%=<>!?|\/]/; @@ -94,6 +94,7 @@ CodeMirror.defineMode("yara", function(config) { electricChars: "{}" }; - }); +}); - CodeMirror.defineMIME("text/yara", "yara"); +CodeMirror.defineMIME("text/yara", "yara"); +CodeMirror.defineMIME("text/x-yara", "yara");