[LyX/master] Amend d4095dc0

Thibaut Cuvelier tcuvelier at lyx.org
Fri Dec 9 18:22:06 UTC 2022


commit 0e2513a0e8b400cbbb368412eb910789d6147054
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date:   Fri Dec 9 20:17:58 2022 +0100

    Amend d4095dc0
    
    Apostrophes were being converted inside code-like areas, like LilyPond insets. This patch fixes tests that started to fail:
    
      Processing `./60/lily-95ee389a.ly'
      Parsing...
      ././60/lily-95ee389a.ly:7:12: error: undefined character or shorthand: &
      \relative c
                 ’’ {  g a b c}
---
 src/Paragraph.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 3f1f814..063bf32 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -3649,7 +3649,7 @@ std::tuple<std::vector<docstring>, std::vector<docstring>, std::vector<docstring
 					delayedChars.emplace_back(1, c);
 				}
 			} else { // No need to delay the character.
-				if (c == '\'')
+				if (c == '\'' && !ignore_fonts)
 					*xs << XMLStream::ESCAPE_NONE << "’";
 				else
 					*xs << c;


More information about the lyx-cvs mailing list