Commit fe89b2f5 authored by pichoro's avatar pichoro

Slightly altered automatic capitalization.

New automatic names for Vanguard, to fit with MTGO Avatar formatting.
parent f2518728
...@@ -5,7 +5,7 @@ installer group: magic/game files ...@@ -5,7 +5,7 @@ installer group: magic/game files
icon: card-back.png icon: card-back.png
position hint: 01 position hint: 01
version: 2009-04-22 version: 2009-05-28
depends on: magic-blends.mse-include 2007-09-23 depends on: magic-blends.mse-include 2007-09-23
depends on: magic-watermarks.mse-include 2007-09-23 depends on: magic-watermarks.mse-include 2007-09-23
......
...@@ -452,9 +452,9 @@ text_filter := ...@@ -452,9 +452,9 @@ text_filter :=
match: "[(]([^)\n]|[(][^)\n]*[)])*[)]?", match: "[(]([^)\n]|[(][^)\n]*[)])*[)]?",
in_context: "(^|[[:space:]])<match>|<atom-keyword><match></", in_context: "(^|[[:space:]])<match>|<atom-keyword><match></",
replace: "<i-auto>&</i-auto>") + replace: "<i-auto>&</i-auto>") +
# step 8 : automatic capitalization # step 8 : automatic capitalization, but not after "("
replace@( replace@(
match: "([(](?:<param-[a-z]*>)?|[ ]*: <param-cost>|—| — )" # preceded by this match: "([ ]*: |—| — )" # preceded by this
+ "([[:lower:]])" # match this + "([[:lower:]])" # match this
+ "(?![)])", # not followed by this + "(?![)])", # not followed by this
replace: { _1 + to_upper(_2) }) + replace: { _1 + to_upper(_2) }) +
......
...@@ -5,13 +5,11 @@ installer group: Magic Vanguard/game files ...@@ -5,13 +5,11 @@ installer group: Magic Vanguard/game files
icon: card-sample.png icon: card-sample.png
position hint: 02 position hint: 02
version: 2009-04-22 version: 2009-05-28
# Author : Wolfwood # Author : Wolfwood
# Most stuff is copy/pasted from magic.mse-game # Most stuff is copy/pasted from magic.mse-game
############################################################## Functions & filters ############################################################## Functions & filters
# General functions # General functions
init script: init script:
############################################################## Sorting mana symbols ############################################################## Sorting mana symbols
...@@ -148,14 +146,14 @@ init script: ...@@ -148,14 +146,14 @@ init script:
) + ) +
# step 3 : expand shortcut words ~ and CARDNAME # step 3 : expand shortcut words ~ and CARDNAME
replace@( replace@(
match: "~|~THIS~|CARDNAME", match: "~|CARDNAME",
in_context: "(^|[[:space:]]|\\()<match>", in_context: "(^|[[:space:]]|\\()<match>",
replace: "<atom-cardname></atom-cardname>" replace: "<atom-cardname></atom-cardname>"
) + ) +
# step 4 : fill in atom fields # step 4 : fill in atom fields
tag_contents@( tag_contents@(
tag: "<atom-cardname>", tag: "<atom-cardname>",
contents: { if card.name=="" then "CARDNAME" else card.name } contents: { if card.name=="" then "CARDNAME" else card.type + " - " + card.name }
) + ) +
# step 4.5 : explict non mana symbols # step 4.5 : explict non mana symbols
replace@( replace@(
...@@ -175,10 +173,10 @@ init script: ...@@ -175,10 +173,10 @@ init script:
match: "[(][^)\n]*[)]?", match: "[(][^)\n]*[)]?",
in_context: "(^|[[:space:]])<match>|<atom-keyword><match></>", in_context: "(^|[[:space:]])<match>|<atom-keyword><match></>",
replace: "<i-auto>&</i-auto>") + replace: "<i-auto>&</i-auto>") +
# step 8 : automatic capitalization # step 8 : automatic capitalization, but not after "("
replace@( replace@(
match: "[a-z]", match: "[a-z]",
in_context: "[(](<param-[a-z]*>)?<match>|[ ]*: <param-cost><match>|—<match>| — <match>", in_context: "[ ]*: <match>|—<match>| — <match>",
replace: { to_upper() }) replace: { to_upper() })
curly_quotes curly_quotes
......
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