Don't require short script help to start with a space

Ref #742
develop
lethosor 2015-11-09 22:58:46 -05:00
parent 48670251e4
commit 2882422a3e
1 changed files with 10 additions and 5 deletions

@ -261,7 +261,12 @@ static std::string getScriptHelp(std::string path, std::string helpprefix)
std::string help;
if (getline(script, help) &&
help.substr(0,helpprefix.length()) == helpprefix)
return help.substr(helpprefix.length());
{
help = help.substr(helpprefix.length());
while (help.size() && help[0] == ' ')
help = help.substr(1);
return help;
}
}
return "No help available.";