Skip to content

Conversation

@localauthor
Copy link
Contributor

@localauthor localauthor commented Nov 10, 2021

This commit aims to fix a problem with the current version of citar-markdown-key-at-point, which is that it returns the closing bracket with the last citekey of a given markdown citation, such that [@Smith2012] returns Smith2012] in the Embark indicator.

Before resorting to thing-at-point, I tried editing the split-string regex in final line of the current code, to include a closing bracket, like so: (cadr (split-string str "[]@;]"))))). This nicely trimmed the closing bracket from the returned string.

But for reasons I don't understand, that change wreaked some strange havoc, leading Embark to recognize anything between brackets as a markdown citation. Not a great outcome.

I had some tinker experience with thing-at-point, so voila, an attempt at a bugfix. Interested to know what you think. Surely there's a simpler solution.

In any case, thanks for a great package. Using it daily and enjoying tracking its development, learning a lot from the conversations here between you and others.

@bdarcus
Copy link
Contributor

bdarcus commented Nov 10, 2021

Thanks @localauthor!

@roshanshariff - this is related to #395; shall I merge and you rebase?

One of the tricky issues with pandoc citation references is they aren't always in brackets.

@bdarcus bdarcus merged commit c832172 into emacs-citar:main Nov 10, 2021
@localauthor localauthor deleted the markdown branch November 11, 2021 07:59
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.

2 participants