mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
in_tag function now looks for a positive number of tag occurrences.
In particular: in "<tag><tag></tag>x</tag>" the x is now in_tag. This fixes the rest of #20. Also added is_in_tag function that returns a bool instead of the tag position. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1456 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -21,8 +21,8 @@ inline size_t spelled_correctly(const String& input, size_t start, size_t end, S
|
||||
String word = untag(input.substr(start,end-start));
|
||||
if (word.empty()) return true;
|
||||
// symbol?
|
||||
if (in_tag(input,_("<sym"),start,end) != String::npos ||
|
||||
in_tag(input,_("<nospellcheck"),start,end) != String::npos) {
|
||||
if (is_in_tag(input,_("<sym"),start,end) ||
|
||||
is_in_tag(input,_("<nospellcheck"),start,end)) {
|
||||
// symbols are always spelled correctly
|
||||
// and <nospellcheck> tags should prevent spellcheck
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user