Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually edit the triggers of cite and ref #65

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

y-marion
Copy link

As I have found myself needing this feature (which was already discussed in issue #25 for refs), I have implemented this for both ref and cite.
This is my first time writing coffescript code, so I hope it is acceptable, if not I will try to fix any issues.

I have furthermore changed the Regular Expression for the cite autocompletion, as commands with multiple brackets (pre & post) were not recognized, as well as empty pre or post fields. (see Biblatex Cheat Sheet)
Effectively this changes the regex to:
/\\\w*(cite|citet|citep|citet\*|citep\*)(\[[^\]]*\]){0,2}({|{[^}]+,)$/
instead of
/\\\w*(cite|citet|citep|citet\*|citep\*)(\[[^\]]+\])?({|{[^}]+,)$/

y-marion and others added 4 commits November 10, 2017 15:17
Standard cite commands can have up to two square brackets before the
bibliography key. Additionally, there doesn't have to be content inside
those square brackets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant