On Mon, Dec 24, 2018 at 10:19:56PM -0500, Scott Kostyshak wrote: > On Fri, Jun 08, 2018 at 11:16:21PM -0400, Scott Kostyshak wrote: > > On Sat, Apr 28, 2018 at 09:19:41PM +0000, Scott Kostyshak wrote: > > > On Thu, Jun 30, 2016 at 02:40:30AM +0000, Richard Heck wrote: > > > > commit 04b8f5cdc4b26105ea855fb9ec5b23227dfd55cb > > > > Author: Richard Heck <rgh...@lyx.org> > > > > Date: Wed Jun 29 22:39:42 2016 -0400 > > > > > > > > Use symbols file to lookup entities for delimiters. Fixes bug #8280. > > > > > > > > Based upon work by Josh Hieronymus. > > > > --- > > > > > > > +docstring convertDelimToXMLEscape(docstring const & name) > > > > +{ > > > > + if (name.size() == 1) { > > > > + char_type const c = name[0]; > > > > + if (c == '<') > > > > + return from_ascii("<"); > > > > + else if (c == '>') > > > > + return from_ascii(">"); > > > > + else > > > > + return name; > > > > + } > > > > + MathWordList const & words = mathedWordList(); > > > > + MathWordList::const_iterator it = words.find(name); > > > > + if (it != words.end()) { > > > > + docstring const escape = it->second.xmlname; > > > > + return escape; > > > > + } > > > > + LYXERR0("Unable to find `" << name <<"' in the mathWordList."); > > > > + return name; > > > > +} > > > > > > If I open Math.lyx, select all, and copy, I get the following messages: > > > > > > mathed/MathStream.cpp (715): Unable to find `\{' in the mathWordList. > > > mathed/MathStream.cpp (715): Unable to find `\}' in the mathWordList. > > > > > > I can reproduce to soon after this commit, so I'm guessing it has always > > > been here. > > > > > > Any ideas how to fix it? > > > > Bump. Any ideas? > > I can still reproduce on master. Is this worth opening a trac ticket?
What about the attached patch? -- Enrico
diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp index b2d01cfb68..774e964a8d 100644 --- a/src/mathed/MathStream.cpp +++ b/src/mathed/MathStream.cpp @@ -708,6 +708,12 @@ docstring convertDelimToXMLEscape(docstring const & name) return from_ascii(">"); else return name; + } else if (name.size() == 2 && name[0] == '\\') { + char_type const c = name[1]; + if (c == '{') + return from_ascii("{"); + else if (c == '}') + return from_ascii("}"); } MathWordList const & words = mathedWordList(); MathWordList::const_iterator it = words.find(name);