Allow citations like -parencite[page 6]{ to work.

This commit is contained in:
Shane Kilkelly 2016-03-30 11:28:56 +01:00
parent c7da9f1eef
commit 059d3432c2

View file

@ -47,7 +47,7 @@ define [
lineUpToCursor = editor.getSession().getTextRange(upToCursorRange)
commandFragment = getLastCommandFragment(lineUpToCursor)
if commandFragment
citeMatch = commandFragment.match(/^~?\\([a-z]*cite[a-z]?){([^}]*,)?(\w*)/)
citeMatch = commandFragment.match(/^~?\\([a-z]*cite[a-z]?(?:\[.*])?){([^}]*,)?(\w*)/)
if citeMatch
beyondCursorRange = new Range(pos.row, pos.column, pos.row, 99999)
lineBeyondCursor = editor.getSession().getTextRange(beyondCursorRange)