Open adql opened 6 years ago
Sorry for the mess, I accidentally published the issue while typing the title.
Hmm. I don't seem to be able to reproduce this. Could you share a text snippet that displays the problem?
Yes, I now see that I missed some detail: it happens when the citation has a postnote such as page number or some comment. I'll update the description.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, [quis] nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat [@Jones2010, 5].
The wrong face begins right with the quis
which is inside square brackets and continues all the way to the end (where it's correctly applied to the postnote), excluding the key itself which has its own face.
So far I had tried it in markdown-mode+pandoc-mode. Now I tried it in simple text-mode (without any hooks) and got the same result. If it still doesn't reproduce then I can try it on vanilla emacs some time later.
Ah yes, I see it now, too. I'll take a look as soon as I can. Most likely it's an incorrect regexp.
Note, BTW, that it only happens with text on a single line. So in the example above the effect disappears if you fill with M-q
. Of course that introduces hard breaks into the paragraph, which doesn't really matter for Markdown but it may matter to you.
Thanks for the great work!
(Old enough for Emacs, too young for hard breaks)
Another workaround: add an html comment <!-- -->
with at least one character anywhere between the first [
that causes the problem and the @
marking the citation key. So taking the example above:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, [quis]<!-- --> nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat [@Jones2010, 5].
Should make the facing correct.
Including
[
in a paragraph before a citation with suffix causes thepandoc-citation-extra-face
(of the suffix) to be applied to the entire text between the first bracket and the citation key.Steps to reproduce:
[
anywhere before the citation in the same paragraph.Pandoc version 20170720.127 (melpa), Emacs 25.3.2