From 3548f6161592d7772de6640e32a65779a98e8b43 Mon Sep 17 00:00:00 2001 From: Nate Stemen Date: Tue, 9 Oct 2018 14:58:02 -0400 Subject: [PATCH] allow capital letters in ref commands e.g. \Cref --- .../aceEditor/auto-complete/AutoCompleteManager.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee index 7fb231d558..52e35ab65a 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.coffee @@ -89,7 +89,7 @@ define [ getCompletions: (editor, session, pos, prefix, callback) -> {commandFragment} = Helpers.getContext(editor, pos) if commandFragment - refMatch = commandFragment.match(/^~?\\([a-z]*ref){([^}]*, *)?(\w*)/) + refMatch = commandFragment.match(/^~?\\([a-zA-Z]*ref){([^}]*, *)?(\w*)/) if refMatch [_, commandName, currentArg] = refMatch result = [] @@ -184,7 +184,7 @@ define [ , 0 if ( change.action == "insert" and - /(begin|end|[a-z]*ref|usepackage|[a-z]*cite[a-z]*|input|include)/.test( + /(begin|end|[a-zA-Z]*ref|usepackage|[a-z]*cite[a-z]*|input|include)/.test( change.lines[0].match(/\\(\w+){}/)?[1] ) )