nixos/fcitx5: handle multi-line string and escape in quickPhrase
This commit is contained in:
@@ -117,7 +117,9 @@ in
|
||||
i18n.inputMethod.fcitx5.addons =
|
||||
lib.optionals (cfg.quickPhrase != { }) [
|
||||
(pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" (
|
||||
lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value: "${name} ${value}") cfg.quickPhrase)
|
||||
lib.mapAttrsToList (
|
||||
name: value: "${name} ${builtins.replaceStrings [ "\\" "\n" ] [ "\\\\" "\\n" ] value}"
|
||||
) cfg.quickPhrase
|
||||
))
|
||||
]
|
||||
++ lib.optionals (cfg.quickPhraseFiles != { }) [
|
||||
|
||||
Reference in New Issue
Block a user