Skip to content
Snippets Groups Projects
Unverified Commit b9bd2840 authored by Nate Stemen's avatar Nate Stemen Committed by GitHub
Browse files

allow capital letters in ref commands e.g. \Cref

parent 14e33ce9
No related branches found
No related tags found
No related merge requests found
......@@ -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]
)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment