Commit 4a8792da authored by pichoro's avatar pichoro

Moving tilde to auto_replace, now that automatic text replacements are fixed.

Trying to make VS parameters de-bold.  Not working out.
parent 41f5fcf4
......@@ -34,3 +34,6 @@ auto replace:
auto replace:
match: @
replace: LEGENDNAME
auto replace:
match: ~
replace: CARDNAME
\ No newline at end of file
......@@ -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>"
) +
......
......@@ -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]*[)]?",
......
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