Implemented auto replace, including GUI

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@631 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-26 19:39:23 +00:00
parent 52ec7b38c0
commit f7b82e3f6b
17 changed files with 742 additions and 541 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ void Writer::handle(const String& value) {
// write indentation and key
writeKey();
writeUTF8(stream, _(": "));
if (value.find_first_of(_('\n')) != String::npos) {
// multiline string
if (value.find_first_of(_('\n')) != String::npos || (!value.empty() && isSpace(value.GetChar(0)))) {
// multiline string, or contains leading whitespace
stream.PutChar(_('\n'));
indentation += 1;
// split lines, and write each line