mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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
This commit is contained in:
@@ -34,3 +34,6 @@ auto replace:
|
||||
auto replace:
|
||||
match: @
|
||||
replace: LEGENDNAME
|
||||
auto replace:
|
||||
match: ~
|
||||
replace: CARDNAME
|
||||
@@ -402,7 +402,7 @@ text_filter :=
|
||||
) +
|
||||
# step 3a : expand shortcut word CARDNAME
|
||||
replace@(
|
||||
match: "~|CARDNAME",
|
||||
match: "CARDNAME",
|
||||
in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before
|
||||
replace: "<atom-cardname></atom-cardname>"
|
||||
) +
|
||||
|
||||
+12
-7
@@ -45,7 +45,12 @@
|
||||
default_expand: {
|
||||
chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text)
|
||||
},
|
||||
combine: { "<b-auto>{keyword}</b-auto><atom-reminder-{mode}> ({process_english_hints(reminder)})</atom-reminder-{mode}>" }
|
||||
combine: {
|
||||
# un-bold parameters
|
||||
keyword := tag_contents@(keyword, tag:"<param",
|
||||
contents: {"</b-auto>{input}<b-auto>"})
|
||||
# the combined result
|
||||
"<b-auto>{keyword}</b-auto><atom-reminder-{mode}> ({process_english_hints(reminder)})</atom-reminder-{mode}>" }
|
||||
) +
|
||||
# step 3 : Expand shortcut words ~ and CARDNAME
|
||||
replace_rule(
|
||||
@@ -64,13 +69,13 @@
|
||||
replace: "<sym-auto>&</sym-auto>") +
|
||||
# step 7: keyword parameters should not be bolded
|
||||
# step 7a: put </b> before each <param>
|
||||
replace@(
|
||||
match: "<param[^>]*>",
|
||||
replace: "</b-auto>&") +
|
||||
#replace@(
|
||||
# match: "<param[^>]*>",
|
||||
# replace: "</b-auto>&") +
|
||||
# step 7b: put <b> after each </param>
|
||||
replace@(
|
||||
match: "</param[^>]*>",
|
||||
replace: "&<b-auto>") +
|
||||
#replace@(
|
||||
# match: "</param[^>]*>",
|
||||
# replace: "&<b-auto>") +
|
||||
# step 8 : Italic reminder text
|
||||
replace_rule(
|
||||
match: "[(][^)\n]*[)]?",
|
||||
|
||||
Reference in New Issue
Block a user