Revert "Make sure LIB_ID escape context allows for formatting constructs."

This reverts commit 02252be29d.
This commit is contained in:
Seth Hillbrand
2022-03-17 16:21:38 -07:00
parent b0f8055377
commit 40bdd26e39
3 changed files with 4 additions and 14 deletions
+2 -12
View File
@@ -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;