Reconciled parsing of field names with Substitution Field Spec. (#82)

According to the spec., valid syntax for merge field names is determined
by the merge source with a couple of minor exceptions.  Current text backends
allow any printable characters, so the SubstitutionField parser now accepts
any printable characters.
This commit is contained in:
Jim Evins
2020-01-01 17:04:19 -05:00
parent aebcda43cb
commit 2d5650767a
2 changed files with 24 additions and 2 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ namespace glabels
{
bool success = false;
while ( s.size() && (s[0].isDigit() || s[0].isLetter() || s[0] == '_' || s[0] == '-') )
while ( s.size() && (s[0].isPrint() && s[0] != ':' && s[0] != '}') )
{
field.mFieldName.append( s[0] );
s = s.mid(1);