mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Updated dictionary
Added new <nospellcheck> tag, to prevent spell-checking of words within. Prevented spellchecking of anything a) matching a keyword or b) formed from a cardname atom Replaced ` as LEGENDNAME alternative; I think it's a bug that it's gone git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1288 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -1,34 +1,37 @@
|
|||||||
33
|
33
|
||||||
mana
|
mana
|
||||||
untap/MSDRJZG
|
untap/MSDRJZG
|
||||||
face-down
|
planeswalker
|
||||||
|
noncreature
|
||||||
|
nonland
|
||||||
|
nonenchantment
|
||||||
|
nonartifact
|
||||||
nonwhite
|
nonwhite
|
||||||
nonblue
|
nonblue
|
||||||
nonblack
|
nonblack
|
||||||
nonred
|
nonred
|
||||||
nongreen
|
nongreen
|
||||||
non-land
|
|
||||||
unblock/USDG
|
unblock/USDG
|
||||||
precombat
|
precombat
|
||||||
postcombat
|
postcombat
|
||||||
scry
|
scry
|
||||||
Plainswalk
|
plainswalk
|
||||||
Islandwalk
|
islandwalk
|
||||||
Swampwalk
|
swampwalk
|
||||||
Mountainwalk
|
mountainwalk
|
||||||
Forestwalk
|
forestwalk
|
||||||
Landwalk
|
landwalk
|
||||||
Desertwalk
|
desertwalk
|
||||||
Plainshome
|
plainshome
|
||||||
Islandhome
|
islandhome
|
||||||
Swamphome
|
swamphome
|
||||||
Mountainhome
|
mountainhome
|
||||||
Foresthome
|
foresthome
|
||||||
Landhome
|
landhome
|
||||||
Soulshift
|
soulshift
|
||||||
Ninjitsu
|
ninjitsu
|
||||||
Bushido
|
bushido
|
||||||
Lifelink
|
lifelink
|
||||||
Gravestorm
|
gravestorm
|
||||||
Fateseal
|
fateseal
|
||||||
Bloodthirst
|
bloodthirst
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
############################################################## Localization
|
############################################################## Localization
|
||||||
|
|
||||||
include file: language
|
include file: language
|
||||||
@@ -379,8 +379,8 @@ text_filter :=
|
|||||||
chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text)
|
chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text)
|
||||||
},
|
},
|
||||||
combine: {
|
combine: {
|
||||||
if mode == "pseudo" then "<i-auto>{keyword}</i-auto>"
|
if mode == "pseudo" then "<i-auto><nospellcheck>{keyword}</nospellcheck></i-auto>"
|
||||||
else "{keyword}<atom-reminder-{mode}> ({process_english_hints(reminder)})</atom-reminder-{mode}>" }
|
else "<nospellcheck>{keyword}</nospellcheck><atom-reminder-{mode}> ({process_english_hints(reminder)})</atom-reminder-{mode}>" }
|
||||||
) +
|
) +
|
||||||
# step 2b : move action keywords' reminder text to the end of the line
|
# step 2b : move action keywords' reminder text to the end of the line
|
||||||
replace@(
|
replace@(
|
||||||
@@ -400,18 +400,18 @@ text_filter :=
|
|||||||
) +
|
) +
|
||||||
# step 3b : expand shortcut words ` and shortened LEGENDNAME
|
# step 3b : expand shortcut words ` and shortened LEGENDNAME
|
||||||
replace@(
|
replace@(
|
||||||
match: "LEGENDNAME",
|
match: "`|`THIS`|LEGENDNAME",
|
||||||
in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before
|
in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before
|
||||||
replace: "<atom-legname></atom-legname>"
|
replace: "<atom-legname></atom-legname>"
|
||||||
) +
|
) +
|
||||||
# step 3c : fill in atom fields
|
# step 3c : fill in atom fields
|
||||||
tag_contents@(
|
tag_contents@(
|
||||||
tag: "<atom-cardname>",
|
tag: "<atom-cardname>",
|
||||||
contents: { if card_name=="" then "CARDNAME" else card_name }
|
contents: { "<nospellcheck>" + (if card_name=="" then "CARDNAME" else card_name) + "</nospellcheck>" }
|
||||||
) +
|
) +
|
||||||
tag_contents@(
|
tag_contents@(
|
||||||
tag: "<atom-legname>",
|
tag: "<atom-legname>",
|
||||||
contents: { if card_name=="" then "LEGENDNAME" else legend_filter(card_name) }
|
contents: { "<nospellcheck>" + (if card_name=="" then "LEGENDNAME" else legend_filter(card_name)) + "</nospellcheck>" }
|
||||||
) +
|
) +
|
||||||
# step 4 : explict non mana symbols
|
# step 4 : explict non mana symbols
|
||||||
replace@(
|
replace@(
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ inline size_t spelled_correctly(const String& input, size_t start, size_t end, S
|
|||||||
String word = untag(input.substr(start,end-start));
|
String word = untag(input.substr(start,end-start));
|
||||||
if (word.empty()) return true;
|
if (word.empty()) return true;
|
||||||
// symbol?
|
// symbol?
|
||||||
if (in_tag(input,_("<sym"),start,end) != String::npos) {
|
if (in_tag(input,_("<sym"),start,end) != String::npos ||
|
||||||
|
in_tag(input,_("<nospellcheck"),start,end) != String::npos) {
|
||||||
// symbols are always spelled correctly
|
// symbols are always spelled correctly
|
||||||
|
// and <nospellcheck> tags should prevent spellcheck
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// run through spellchecker(s)
|
// run through spellchecker(s)
|
||||||
|
|||||||
Reference in New Issue
Block a user