Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
🐛 Fix colon/equal Windows params. w/o value not being interpreted
Browse files Browse the repository at this point in the history
  • Loading branch information
louistakepillz committed Apr 18, 2015
1 parent 9511fc0 commit eb342f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ArgumentParser/Patterns/WindowsColonParameterPattern.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public static partial class Parser
("" (?> \\. | [^""])* "")|
(' (?> \\. | [^'])* ')|
( \\./? | [^/""'] | (?<!\s) /+ )+
)+
)*
)
)?
)(?=$|\s)";
#else
private const String WINDOWS_COLON_PARAMETER_PATTERN = @"(?<=^|\s)(?<prefix>/)((?<tag>[\w\-]+)((\s+|:)(?<value>((""(?>\\.|[^""])*"")|('(?>\\.|[^'])*')|(\\./?|[^/""']|(?<!\s)/+)+)+))?)(?=$|\s)";
private const String WINDOWS_COLON_PARAMETER_PATTERN = @"(?<=^|\s)(?<prefix>/)((?<tag>[\w\-]+)((\s+|:)(?<value>((""(?>\\.|[^""])*"")|('(?>\\.|[^'])*')|(\\./?|[^/""']|(?<!\s)/+)+)*))?)(?=$|\s)";
#endif
}
}
4 changes: 2 additions & 2 deletions ArgumentParser/Patterns/WindowsEqualParameterPattern.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public static partial class Parser
("" (?> \\. | [^""])* "")|
(' (?> \\. | [^'])* ')|
( \\./? | [^/""'] | (?<!\s) /+ )+
)+
)*
)
)?
)(?=$|\s)";
#else
private const String WINDOWS_EQUAL_PARAMETER_PATTERN = @"(?<=^|\s)(?<prefix>/)((?<tag>[\w\-\:]+)((\s+|=)(?<value>((""(?>\\.|[^""])*"")|('(?>\\.|[^'])*')|(\\./?|[^/""']|(?<!\s)/+)+)+))?)(?=$|\s)";
private const String WINDOWS_EQUAL_PARAMETER_PATTERN = @"(?<=^|\s)(?<prefix>/)((?<tag>[\w\-\:]+)((\s+|=)(?<value>((""(?>\\.|[^""])*"")|('(?>\\.|[^'])*')|(\\./?|[^/""']|(?<!\s)/+)+)*))?)(?=$|\s)";
#endif
}
}

0 comments on commit eb342f6

Please sign in to comment.