more better comment parsing
@ -5,7 +5,7 @@ All notable changes to Stability Matrix will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2.0.0.html).
## v2.something
## v2.10.2
### Fixed
- Fixed more crashes when loading invalid connected model info files
- Fixed pip installs not parsing comments properly
@ -30,7 +30,9 @@ public record PipInstallArgs : ProcessArgsBuilder
{
var requirementsEntries = requirements
.SplitLines(StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
.Where(s => !s.StartsWith('#'));
.Where(s => !s.StartsWith('#'))
.Select(s => s.Contains('#') ? s.Substring(0, s.IndexOf('#')) : s)
.Where(s => !string.IsNullOrWhiteSpace(s));
if (excludePattern is not null)