We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ec119f commit ab69128Copy full SHA for ab69128
src/ssh_config/parser.rs
@@ -64,7 +64,13 @@ impl Parser {
64
65
let mut line = String::new();
66
while reader.read_line(&mut line)? > 0 {
67
- line = line.trim().to_string();
+ // We separate parts that contain comments with #
68
+ line = if line.contains('#') {
69
+ line.split('#').next().unwrap().to_string()
70
+ } else {
71
+ line.trim().to_string()
72
+ };
73
+
74
if line.is_empty() || line.starts_with('#') {
75
line.clear();
76
continue;
0 commit comments