Revert "Make sure LIB_ID escape context allows for formatting constructs."
This reverts commit 02252be29d.
This commit is contained in:
+2
-12
@@ -142,15 +142,7 @@ bool ConvertSmartQuotesAndDashes( wxString* aString )
|
||||
|
||||
wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
||||
{
|
||||
wxString converted;
|
||||
std::vector<bool> braceStack; // true == formatting construct
|
||||
|
||||
auto hasFormattingPrefix =
|
||||
[&]()
|
||||
{
|
||||
static wxString prefixes = wxT( "~_^" );
|
||||
return !converted.IsEmpty() && prefixes.Find( converted.Last() ) >= 0;
|
||||
};
|
||||
wxString converted;
|
||||
|
||||
converted.reserve( aSource.length() );
|
||||
|
||||
@@ -167,7 +159,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
||||
}
|
||||
else if( aContext == CTX_LIBID )
|
||||
{
|
||||
if( c == '{' && !hasFormattingPrefix() )
|
||||
if( c == '{' )
|
||||
converted += wxT( "{brace}" );
|
||||
else if( c == '/' )
|
||||
converted += wxT( "{slash}" );
|
||||
@@ -235,9 +227,7 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
||||
converted += c;
|
||||
}
|
||||
else
|
||||
{
|
||||
converted += c;
|
||||
}
|
||||
}
|
||||
|
||||
return converted;
|
||||
|
||||
Reference in New Issue
Block a user