Process nested formatting within a variable cross-reference.

This commit is contained in:
Jeff Young 2022-06-04 00:34:14 +01:00
parent 8b75a32cfa
commit 099061f46d
1 changed files with 13 additions and 1 deletions

View File

@ -301,11 +301,23 @@ wxString SCHEMATIC::ConvertRefsToKIIDs( const wxString& aSource ) const
{
wxString token;
bool isCrossRef = false;
int nesting = 0;
for( i = i + 2; i < sourceLen; ++i )
{
if( aSource[i] == '{'
&& ( aSource[i-1] == '_' || aSource[i-1] == '^' || aSource[i-1] == '~' ) )
{
nesting++;
}
if( aSource[i] == '}' )
break;
{
nesting--;
if( nesting < 0 )
break;
}
if( aSource[i] == ':' )
isCrossRef = true;