Skip to content

Commit

Permalink
Merge pull request #68 from gvolpe/fix/string-pipe-parser
Browse files Browse the repository at this point in the history
parser: add pipe in strings
  • Loading branch information
gvolpe authored Aug 23, 2022
2 parents 9f8bc3b + 8adb975 commit 701e926
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions data/custom.settings
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ saved-view='/org/gnome/desktop/input-sources/'
window-height=709
window-is-maximized=false
window-width=785

[foo]
services=['service1|wg-quick@wg0.service', 'service2|wg-quick@wg1.service']
4 changes: 4 additions & 0 deletions output/custom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ with lib.hm.gvariant;
window-width = 785;
};

"ca/desrt/dconf-editor/foo" = {
services = [ "service1|wg-quick@wg0.service" "service2|wg-quick@wg1.service" ];
};

};
}
2 changes: 1 addition & 1 deletion src/DConf.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ vString parser = try $ do
where
single = many1 (string "'") *> parser inputs (string "'")
double = many1 (char '"') *> parser (inputs <|> string "'") (char '"')
tokens = many1 <$> [alphaNum, space] ++ (char <$> "=$!&+-_()[]{},#@\\")
tokens = many1 <$> [alphaNum, space] ++ (char <$> "=$!&+-_()[]{}|,#@\\")
files = many1 . char <$> ":/."
shorts = many1 . char <$> "<>"
inputs = choice (tokens ++ files ++ shorts)
Expand Down

0 comments on commit 701e926

Please sign in to comment.