Repository navigation
fix: ignore comment lines starting with # or ; in parse - #195
feritcemkahraman wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Parse and test line handling src/index.ts, test/index.test.ts |
parse skips blank lines and lines whose first non-whitespace character is # or ;. It matches other lines after trimming leading whitespace. The test covers indented and unindented comments. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers: pi0
Merge Risk: 
Minimal · up to b62df
-
The comment-line parsing change is covered by the added tests and is ready to merge.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Summary
In configuration files (.rc / .conf / INI files), comments are denoted by
#or;. Previously, if a commented-out line contained an equals sign without whitespace (e.g.#key=valueor;key=value), the regular expression matched#keyor;keyas the property name and parsed it into the resulting config object.Changes
#or;(ignoring leading whitespace) inparse().test/index.test.tsverifying that#and;comment lines containing=are ignored.Summary by CodeRabbit
#or;are skipped, so they no longer interfere with parsing. Existing parsed results remain unchanged when these lines are present.