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: ...@@ -34,3 +34,6 @@ auto replace:
auto replace: auto replace:
match: @ match: @
replace: LEGENDNAME replace: LEGENDNAME
auto replace:
match: ~
replace: CARDNAME
\ No newline at end of file
...@@ -402,7 +402,7 @@ text_filter := ...@@ -402,7 +402,7 @@ text_filter :=
) + ) +
# step 3a : expand shortcut word CARDNAME # step 3a : expand shortcut word CARDNAME
replace@( replace@(
match: "~|CARDNAME", match: "CARDNAME",
in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before in_context: "(^|[[:space:]]|\\()<match>", # TODO: Allow any punctuation before
replace: "<atom-cardname></atom-cardname>" replace: "<atom-cardname></atom-cardname>"
) + ) +
......
...@@ -45,7 +45,12 @@ ...@@ -45,7 +45,12 @@
default_expand: { default_expand: {
chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text) 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 # step 3 : Expand shortcut words ~ and CARDNAME
replace_rule( replace_rule(
...@@ -64,13 +69,13 @@ ...@@ -64,13 +69,13 @@
replace: "<sym-auto>&</sym-auto>") + replace: "<sym-auto>&</sym-auto>") +
# step 7: keyword parameters should not be bolded # step 7: keyword parameters should not be bolded
# step 7a: put </b> before each <param> # step 7a: put </b> before each <param>
replace@( #replace@(
match: "<param[^>]*>", # match: "<param[^>]*>",
replace: "</b-auto>&") + # replace: "</b-auto>&") +
# step 7b: put <b> after each </param> # step 7b: put <b> after each </param>
replace@( #replace@(
match: "</param[^>]*>", # match: "</param[^>]*>",
replace: "&<b-auto>") + # replace: "&<b-auto>") +
# step 8 : Italic reminder text # step 8 : Italic reminder text
replace_rule( replace_rule(
match: "[(][^)\n]*[)]?", 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