mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Updated text replacement method in Vanguard.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@678 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+33
-60
@@ -141,17 +141,6 @@ init script:
|
||||
replace_rule(
|
||||
match: "\\[[STXYZWUBRG0-9/|]+\\]",
|
||||
replace: {"<sym>" + mana_filter_t() + "</sym>"} ) +
|
||||
# step 6 : longdash
|
||||
replace_rule(
|
||||
match: "--",
|
||||
replace: "—") +
|
||||
replace_rule(
|
||||
match: " - ",
|
||||
replace: " — ") +
|
||||
# step 6b : Æ replacement
|
||||
replace_rule(
|
||||
match: "AE",
|
||||
replace: "Æ" ) +
|
||||
# step 7 : italic reminder text
|
||||
replace_rule(
|
||||
match: "[(][^)\n]*[)]?",
|
||||
@@ -168,17 +157,6 @@ init script:
|
||||
# the flavor text filter
|
||||
# - makes all text italic
|
||||
flavor_text_filter :=
|
||||
# step 1 : Æ replacement rule
|
||||
replace_rule(
|
||||
match: "AE",
|
||||
replace: "Æ") +
|
||||
# step 1.5 : longdash
|
||||
replace_rule(
|
||||
match: "--",
|
||||
replace: "—") +
|
||||
replace_rule(
|
||||
match: " - ",
|
||||
replace: " — ") +
|
||||
# step 2 : remove italic tags
|
||||
tag_remove_rule(tag: "<i-flavor>") +
|
||||
# step 3 : surround by <i> tags
|
||||
@@ -186,42 +164,6 @@ init script:
|
||||
# curly quotes
|
||||
curly_quotes
|
||||
|
||||
#character filter for copyright line
|
||||
copyright_filter :=
|
||||
# step 1 : Æ replacement rule
|
||||
replace_rule(
|
||||
match: "AE",
|
||||
replace: "Æ") +
|
||||
# step 2 : longdash for keywords
|
||||
replace_rule(
|
||||
match: "--",
|
||||
replace: "—") +
|
||||
replace_rule(
|
||||
match: " - ",
|
||||
replace: " — ") +
|
||||
# step 3 : trademark symbol
|
||||
replace_rule(
|
||||
match: "TM",
|
||||
replace: "™") +
|
||||
# step 4 : copyright symbol
|
||||
replace_rule(
|
||||
match: "CR",
|
||||
replace: "©")
|
||||
|
||||
#character filter for title line
|
||||
name_filter :=
|
||||
# step 1 : Æ replacement rule
|
||||
replace_rule(
|
||||
match: "AE",
|
||||
replace: "Æ") +
|
||||
# step 2 : longdash for keywords
|
||||
replace_rule(
|
||||
match: "--",
|
||||
replace: "—") +
|
||||
replace_rule(
|
||||
match: " - ",
|
||||
replace: " — ")
|
||||
|
||||
############################################################## Set fields
|
||||
|
||||
set field:
|
||||
@@ -240,7 +182,6 @@ set field:
|
||||
set field:
|
||||
type: text
|
||||
name: copyright
|
||||
script: copyright_filter(value)
|
||||
set field:
|
||||
type: info
|
||||
name: Defaults and Automation
|
||||
@@ -417,13 +358,45 @@ card field:
|
||||
else
|
||||
forward_editor(field: card.copyright)
|
||||
|
||||
############################################################## Auto replace
|
||||
|
||||
# Do we need categories?
|
||||
#auto replace category: text box
|
||||
#auto replace category: copyright
|
||||
#auto replace category: everywhere
|
||||
auto replace:
|
||||
match: (C)
|
||||
replace: ©
|
||||
auto replace:
|
||||
match: AE
|
||||
replace: Æ
|
||||
whole word: false
|
||||
auto replace:
|
||||
match: TM
|
||||
replace: ™
|
||||
whole word: false
|
||||
auto replace:
|
||||
match: --
|
||||
replace: —
|
||||
auto replace:
|
||||
# note the spaces
|
||||
match:
|
||||
-
|
||||
replace:
|
||||
—
|
||||
auto replace:
|
||||
match: CIP
|
||||
replace: comes into play
|
||||
auto replace:
|
||||
match: AAA
|
||||
replace: as an additional cost to play
|
||||
|
||||
############################################################## Keywords
|
||||
|
||||
############################# Keyword rules
|
||||
|
||||
has keywords: true
|
||||
|
||||
keyword match script: name_filter(value)
|
||||
#keyword preview: {keyword} <i>({reminder})</i>
|
||||
|
||||
keyword mode:
|
||||
|
||||
Reference in New Issue
Block a user