curly_quotes now considers EM_DASH to be a space, so it uses an open quote after it.

Fixes #33

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1449 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-07-21 18:23:57 +00:00
parent f8c7961c03
commit f88d92acab
2 changed files with 7 additions and 18 deletions
+5 -1
View File
@@ -607,6 +607,10 @@ void check_tagged(const String& str, bool check_balance) {
// ----------------------------------------------------------------------------- : Other utilities
bool is_space_like(Char c) {
return isSpace(c) || c == _('(') || c == _('[') || c == _('{') || c == EN_DASH || c == EM_DASH;
}
String curly_quotes(String str, bool curl) {
bool open = true, in_tag = false;
FOR_EACH(c, str) {
@@ -620,7 +624,7 @@ String curly_quotes(String str, bool curl) {
in_tag = false;
} else if (!in_tag) {
// Also allow double-nesting of quotes
open = isSpace(c) || c == _('(') || c == _('[');
open = is_space_like(c);
}
}
return str;