From ed616698a876625ee6fe0a88e665ad1f1666af54 Mon Sep 17 00:00:00 2001 From: homer77 Date: Thu, 27 Jan 2022 13:42:56 +0100 Subject: [PATCH] Fixed the ampersand decoding problem. --- lektor_citation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lektor_citation.py b/lektor_citation.py index d5b2385..042fc05 100644 --- a/lektor_citation.py +++ b/lektor_citation.py @@ -46,7 +46,7 @@ class CitationPlugin(Plugin): if len(lAuthor) > 1: if n == (len(lAuthor) - 1): - authors += " \& " + authors += " & " elif n < (len(lAuthor) -1): authors += ", " @@ -77,7 +77,7 @@ class CitationPlugin(Plugin): if len(lAuthor) > 1: if n == (len(lAuthor) - 1): - authors += " \& " + authors += " & " elif n < (len(lAuthor) -1): authors += ", " @@ -240,7 +240,7 @@ class CitationPlugin(Plugin): def on_setup_env(self, **extra): def decode_filter(value): """ Make sure that special chars like german umlaute or accents are displayed in unicode """ - return LatexNodes2Text().latex_to_text(value) + return LatexNodes2Text().latex_to_text(value.replace(" & ", " \& ")) self.env.jinja_env.globals['citation_entries'] = self.citation_entries self.env.jinja_env.globals['citation_entry'] = self.citation_entry