mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
nixos/fcitx5: handle multi-line string and escape in quickPhrase
This commit is contained in:
parent
fedf16bc04
commit
97728d9f5a
1 changed files with 3 additions and 1 deletions
|
@ -117,7 +117,9 @@ in
|
||||||
i18n.inputMethod.fcitx5.addons =
|
i18n.inputMethod.fcitx5.addons =
|
||||||
lib.optionals (cfg.quickPhrase != { }) [
|
lib.optionals (cfg.quickPhrase != { }) [
|
||||||
(pkgs.writeTextDir "share/fcitx5/data/QuickPhrase.mb" (
|
(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 != { }) [
|
++ lib.optionals (cfg.quickPhraseFiles != { }) [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue