mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Better matching against keys.
Allows for successive matching as you type.
This commit is contained in:
parent
7aa8f3a5da
commit
3bd52f4aaf
1 changed files with 2 additions and 1 deletions
|
@ -49,7 +49,8 @@ define [
|
|||
range = new Range(pos.row, 0, pos.row, pos.column)
|
||||
lineUpToCursor = editor.getSession().getTextRange(range)
|
||||
commandFragment = getLastCommandFragment(lineUpToCursor)
|
||||
if commandFragment == '\\cite{'
|
||||
# if commandFragment == '\\cite{'
|
||||
if commandFragment.match(/^~?\\cite{\w*/)
|
||||
result = references.keys.map (key) -> {
|
||||
caption: "\\cite{#{key}",
|
||||
snippet: "\\cite{#{key}",
|
||||
|
|
Loading…
Reference in a new issue