Closed scoavoux closed 9 years ago
This bug should be fixed. The issue was with the regex used. The regex was enforcing that something was typed after the opening bracket.
Some ref[@auth2000] and I want to include another one[
The program reverses the sentence :
[eno rehtona edulcni ot tnaw I dna ]0002htua@[fer emoS
It previously used the following regex :
([^,^;]+?@?)([;,].+?\[|\[)
This matched correctly when something was following the opening square bracket, but not when the bracket was bare. The fix is to use a star instead of the plus sign, to allow for the first group to be empty :
([^,^;]*?@?)([;,].+?\[|\[)
When there are already square brackets in a paragraph, if PandocCite is triggered without a @ character, inserting a citation will discard everything from the last opened square bracket.
For instance, if I want to cite otherauth2000 (with
PandocCite
as the moment where I trigger the command)Gives
But
gives