From 63687f693b4ee7fa821ff1d22614b983cc9f97d5 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 19 Apr 2015 20:27:07 +0400 Subject: [PATCH] fix #2441 function highlighting in rust mode --- lib/ace/mode/rust_highlight_rules.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/rust_highlight_rules.js b/lib/ace/mode/rust_highlight_rules.js index 181cf11a..056e7a55 100644 --- a/lib/ace/mode/rust_highlight_rules.js +++ b/lib/ace/mode/rust_highlight_rules.js @@ -84,9 +84,8 @@ var RustHighlightRules = function() { { token: 'constant.character.escape.source.rust', regex: stringEscape }, { defaultToken: 'string.quoted.double.source.rust' } ] }, - { token: [ 'keyword.source.rust', 'meta.function.source.rust', - 'entity.name.function.source.rust', 'meta.function.source.rust' ], - regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' }, + { token: [ 'keyword.source.rust', 'text', 'entity.name.function.source.rust' ], + regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)' }, { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' }, { token: 'keyword.source.rust', regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },