fix capitalization issues on This type

This commit is contained in:
cajun
2025-01-11 18:16:08 -06:00
parent 797a2920fd
commit 4158a989fd

View File

@@ -1692,6 +1692,19 @@ text_filter :=
tag: "<atom-cardname>",
contents: { "<nospellcheck>" + (if card_name=="" then "CARDNAME" else strip_card_codes(card_name, atom:true)) + "</nospellcheck>" }
) +
#### capitalize This type when appropriate
replace@(
match:"([•.]) <atom-cardname><nospellcheck>this",
replace:"\\1 <atom-cardname><nospellcheck>This"
) +
replace@(
match:"([\"“'])<atom-cardname><nospellcheck>this",
replace:"\\1<atom-cardname><nospellcheck>This"
) +
replace@(
match:"^<atom-cardname><nospellcheck>this",
replace:"<atom-cardname><nospellcheck>This"
) +
tag_contents@(
tag: "<atom-legname>",
contents: { "<nospellcheck>" + (if card_name=="" then "LEGENDNAME" else legend_filter(strip_card_codes(card_name, atom:true))) + "</nospellcheck>" }
@@ -3010,8 +3023,8 @@ card_name_for_level := {
if set.CARDNAME_replacement == "card's type"
then (
ty := to_lower(cardname_type(card["type"+tag]))
if ty == "" then "this"
else "this " + ty
if ty == "" then "This"
else "This " + ty
)
else if set.CARDNAME_replacement == "card's alias" and card["alias"+tag] != ""
then card["alias"+tag]