Fixed the ampersand decoding problem.
This commit is contained in:
		
							parent
							
								
									6033eadec5
								
							
						
					
					
						commit
						ed616698a8
					
				| 
						 | 
					@ -46,7 +46,7 @@ class CitationPlugin(Plugin):
 | 
				
			||||||
            if len(lAuthor) > 1:
 | 
					            if len(lAuthor) > 1:
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if n == (len(lAuthor) - 1):
 | 
					                if n == (len(lAuthor) - 1):
 | 
				
			||||||
                    authors += " \& "
 | 
					                    authors += " & "
 | 
				
			||||||
                elif n < (len(lAuthor) -1):
 | 
					                elif n < (len(lAuthor) -1):
 | 
				
			||||||
                    authors += ", "
 | 
					                    authors += ", "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -77,7 +77,7 @@ class CitationPlugin(Plugin):
 | 
				
			||||||
            if len(lAuthor) > 1:
 | 
					            if len(lAuthor) > 1:
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
                if n == (len(lAuthor) - 1):
 | 
					                if n == (len(lAuthor) - 1):
 | 
				
			||||||
                    authors += " \& "
 | 
					                    authors += " & "
 | 
				
			||||||
                elif n < (len(lAuthor) -1):
 | 
					                elif n < (len(lAuthor) -1):
 | 
				
			||||||
                    authors += ", "
 | 
					                    authors += ", "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -240,7 +240,7 @@ class CitationPlugin(Plugin):
 | 
				
			||||||
    def on_setup_env(self, **extra):
 | 
					    def on_setup_env(self, **extra):
 | 
				
			||||||
        def decode_filter(value):
 | 
					        def decode_filter(value):
 | 
				
			||||||
            """ Make sure that special chars like german umlaute or accents are displayed in unicode """
 | 
					            """ 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_entries'] = self.citation_entries
 | 
				
			||||||
        self.env.jinja_env.globals['citation_entry'] = self.citation_entry
 | 
					        self.env.jinja_env.globals['citation_entry'] = self.citation_entry
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue