Added support for separators that are part of a parameter;

Keywords match whole words only;
Added english_singular/plural functions;
Fixed possible infinite loop in reader

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@347 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-12 20:17:49 +00:00
parent 175e246579
commit 2d48f27fe0
7 changed files with 329 additions and 101 deletions
+2 -1
View File
@@ -132,6 +132,7 @@ void Reader::readLine(bool in_string) {
}
key = cannocial_name_form(trim(key));
value = pos == String::npos ? _("") : trim_left(line.substr(pos+1));
if (key.empty() && pos!=String::npos) key = _(" "); // we don't want an empty key if there was a colon
}
void Reader::unknownKey() {
@@ -162,7 +163,7 @@ void Reader::unknownKey() {
return;
}
}
if (indent == expected_indent) {
if (indent >= expected_indent) {
warning(_("Unexpected key: '") + key + _("'"));
do {
moveNext();