Commit b4bab637 authored by pichoro's avatar pichoro

Updated text replacement method in Vanguard.

parent 09fd6c60
...@@ -141,17 +141,6 @@ init script: ...@@ -141,17 +141,6 @@ init script:
replace_rule( replace_rule(
match: "\\[[STXYZWUBRG0-9/|]+\\]", match: "\\[[STXYZWUBRG0-9/|]+\\]",
replace: {"<sym>" + mana_filter_t() + "</sym>"} ) + 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 # step 7 : italic reminder text
replace_rule( replace_rule(
match: "[(][^)\n]*[)]?", match: "[(][^)\n]*[)]?",
...@@ -168,17 +157,6 @@ init script: ...@@ -168,17 +157,6 @@ init script:
# the flavor text filter # the flavor text filter
# - makes all text italic # - makes all text italic
flavor_text_filter := 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 # step 2 : remove italic tags
tag_remove_rule(tag: "<i-flavor>") + tag_remove_rule(tag: "<i-flavor>") +
# step 3 : surround by <i> tags # step 3 : surround by <i> tags
...@@ -186,42 +164,6 @@ init script: ...@@ -186,42 +164,6 @@ init script:
# curly quotes # curly quotes
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 fields
set field: set field:
...@@ -240,7 +182,6 @@ set field: ...@@ -240,7 +182,6 @@ set field:
set field: set field:
type: text type: text
name: copyright name: copyright
script: copyright_filter(value)
set field: set field:
type: info type: info
name: Defaults and Automation name: Defaults and Automation
...@@ -417,13 +358,45 @@ card field: ...@@ -417,13 +358,45 @@ card field:
else else
forward_editor(field: card.copyright) 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 ############################################################## Keywords
############################# Keyword rules ############################# Keyword rules
has keywords: true has keywords: true
keyword match script: name_filter(value)
#keyword preview: {keyword} <i>({reminder})</i> #keyword preview: {keyword} <i>({reminder})</i>
keyword mode: keyword mode:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment