Fix subtype filter (#36)

* Fix dropdown menus not adding spaces
This commit is contained in:
GenevensiS
2024-03-01 23:44:59 +01:00
committed by GitHub
parent 9814450371
commit b808664d74

View File

@@ -1117,13 +1117,15 @@ super_type_filter := {
split_at_spaces := split_text@(match: " +")
remove_leading_spaces := replace@(match: "^ +", replace: "")
remove_trailing_soft_tags := replace@(match: "<soft>.*?</soft>$", replace: "")
replace_soft_tags := replace@(match: "<soft>.*?</soft>", replace: " ")
sub_type_filter :=
{
subtype_separator := lang_setting("subtype_separator")
code := lang_setting("code")
input := replace(input, match: "<soft>" + subtype_separator + "</soft>", replace: "")
input := remove_tag(input, tag: "<soft")
input := remove_tag(input, tag: "<word-list")
input := remove_trailing_soft_tags(input)
input := replace_soft_tags(input)
### What word list to use?
list_type_rest := if lang_setting("is_creature")(type) or lang_setting("is_kindred")(type) then "class-"+code
else if lang_setting("is_land")(type) then "land"