mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Handle explicit calls before handling quotes
This commit is contained in:
parent
fa6c205e5d
commit
3ac030d75a
1 changed files with 8 additions and 7 deletions
|
@ -303,6 +303,14 @@ namespace MWGui
|
||||||
bool has_front_quote = false;
|
bool has_front_quote = false;
|
||||||
|
|
||||||
/* Does the input string contain things that don't have to be completed? If yes erase them. */
|
/* Does the input string contain things that don't have to be completed? If yes erase them. */
|
||||||
|
|
||||||
|
/* Erase a possible call to an explicit reference. */
|
||||||
|
size_t explicitPos = tmp.find("->");
|
||||||
|
if (explicitPos != std::string::npos)
|
||||||
|
{
|
||||||
|
tmp.erase(0, explicitPos+2);
|
||||||
|
}
|
||||||
|
|
||||||
/* Are there quotation marks? */
|
/* Are there quotation marks? */
|
||||||
if( tmp.find('"') != std::string::npos ) {
|
if( tmp.find('"') != std::string::npos ) {
|
||||||
int numquotes=0;
|
int numquotes=0;
|
||||||
|
@ -340,13 +348,6 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Erase a possible call to an explicit reference
|
|
||||||
size_t explicitPos = tmp.find("->");
|
|
||||||
if (explicitPos != std::string::npos)
|
|
||||||
{
|
|
||||||
tmp.erase(0, explicitPos+2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Erase the input from the output string so we can easily append the completed form later. */
|
/* Erase the input from the output string so we can easily append the completed form later. */
|
||||||
output.erase(output.end()-tmp.length(), output.end());
|
output.erase(output.end()-tmp.length(), output.end());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue