mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-29 08:30:04 +00:00
Save-state: wrap string in quotes when it contains comment char '#'. Fixes #1066
This commit is contained in:
parent
a4341aa808
commit
cbc0c2cf87
@ -500,7 +500,10 @@ void YamlSaveHelper::SaveString(const char* key, const char* value)
|
||||
throw std::runtime_error("Unable to convert to UTF-8: " + std::string(value));
|
||||
}
|
||||
|
||||
Save("%s: %s\n", key, m_pMbStr);
|
||||
if (std::string(m_pMbStr).find("#") == std::string::npos)
|
||||
Save("%s: %s\n", key, m_pMbStr);
|
||||
else
|
||||
Save("%s: \"%s\"\n", key, m_pMbStr); // Wrap the string in quotes when it contains the comment character "#" (GH#1066)
|
||||
}
|
||||
|
||||
void YamlSaveHelper::SaveString(const char* key, const std::string & value)
|
||||
|
Loading…
Reference in New Issue
Block a user