We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93f0d48 commit 7df6d10Copy full SHA for 7df6d10
lib/cabal-project-parser.nix
@@ -46,6 +46,8 @@ let
46
let
47
# Look for a new attribute name
48
pair = builtins.match "([^ :]*): *(.*)" s;
49
+ trim = x: let m = builtins.match "(.*[^ \t])[ \t]*" x;
50
+ in pkgs.lib.optionalString (m != null) (builtins.head m);
51
52
# Function to build the next parse state when the attribute name is known
53
nextState = name: value: {
@@ -62,7 +64,7 @@ let
62
64
if pair != null
63
65
then
66
# First line of a new attribute
- nextState (builtins.head pair) (builtins.elemAt pair 1)
67
+ nextState (builtins.head pair) (trim (builtins.elemAt pair 1))
68
else
69
if name != null
70
then nextState name s # Append another line to the current attribute
0 commit comments