From 12789420e98ae78b731ac472f01c7605a851d04b Mon Sep 17 00:00:00 2001 From: pichoro Date: Thu, 15 Jan 2009 06:28:32 +0000 Subject: [PATCH] Moving tilde to auto_replace, now that automatic text replacements are fixed. Trying to make VS parameters de-bold. Not working out. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1353 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/magic.mse-game/auto_replace | 3 +++ data/magic.mse-game/script | 2 +- data/vs.mse-game/script | 19 ++++++++++++------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/data/magic.mse-game/auto_replace b/data/magic.mse-game/auto_replace index ac303432..3ed93037 100644 --- a/data/magic.mse-game/auto_replace +++ b/data/magic.mse-game/auto_replace @@ -34,3 +34,6 @@ auto replace: auto replace: match: @ replace: LEGENDNAME +auto replace: + match: ~ + replace: CARDNAME \ No newline at end of file diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index fd302600..175b302f 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -402,7 +402,7 @@ text_filter := ) + # step 3a : expand shortcut word CARDNAME replace@( - match: "~|CARDNAME", + match: "CARDNAME", in_context: "(^|[[:space:]]|\\()", # TODO: Allow any punctuation before replace: "" ) + diff --git a/data/vs.mse-game/script b/data/vs.mse-game/script index 9cf5c0f1..6e13d695 100644 --- a/data/vs.mse-game/script +++ b/data/vs.mse-game/script @@ -45,7 +45,12 @@ default_expand: { chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text) }, - combine: { "{keyword} ({process_english_hints(reminder)})" } + combine: { + # un-bold parameters + keyword := tag_contents@(keyword, tag:"{input}"}) + # the combined result + "{keyword} ({process_english_hints(reminder)})" } ) + # step 3 : Expand shortcut words ~ and CARDNAME replace_rule( @@ -64,13 +69,13 @@ replace: "&") + # step 7: keyword parameters should not be bolded # step 7a: put before each - replace@( - match: "]*>", - replace: "&") + + #replace@( + # match: "]*>", + # replace: "&") + # step 7b: put after each - replace@( - match: "]*>", - replace: "&") + + #replace@( + # match: "]*>", + # replace: "&") + # step 8 : Italic reminder text replace_rule( match: "[(][^)\n]*[)]?",