remove automatic <nospellcheck> tags, made the keyword reminder text code a bit easier to read.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1310 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-09 00:11:34 +00:00
parent 02e676c54b
commit bce5761781
+7 -3
View File
@@ -369,7 +369,9 @@ text_filter :=
# step 1 : remove all automatic tags
remove_tag@(tag: "<sym-auto>") +
remove_tag@(tag: "<i-auto>") +
remove_tag@(tag: "<b-auto>") +
remove_tag@(tag: "<error-spelling") +
remove_tag@(tag: "<nospellcheck") +
# step 2 : reminder text for keywords
expand_keywords@(
condition: {
@@ -378,9 +380,11 @@ text_filter :=
default_expand: {
chosen(choice:if correct_case then mode else "lower case", set.automatic_reminder_text)
},
combine: {
if mode == "pseudo" then "<i-auto><nospellcheck>{keyword}</nospellcheck></i-auto>"
else "<nospellcheck>{keyword}</nospellcheck><atom-reminder-{mode}> ({process_english_hints(reminder)})</atom-reminder-{mode}>" }
combine: {
keyword := "<nospellcheck>{keyword}</nospellcheck>"
reminder := process_english_hints(reminder)
if mode == "pseudo" then "<i-auto>{keyword}</i-auto>"
else "{keyword}<atom-reminder-{mode}> ({reminder})</atom-reminder-{mode}>" }
) +
# step 2b : move action keywords' reminder text to the end of the line
replace@(