redhat-et / redhat-et/docsclaw
search_files strips leading whitespace from matched lines
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 1
Description
Background
internal/searchfiles/searchfiles.go uses strings.TrimSpace on matched lines before formatting the file:line:match output. This removes indentation, which is significant for code searches.
Expected behavior
The raw matched line should be preserved in the output so indentation and trailing spaces are retained.
Files to change
internal/searchfiles/searchfiles.gointernal/searchfiles/searchfiles_test.go
Related
PR #102 (Phase 2 OpenClaw/Hermes tool compatibility)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in internal/searchfiles/searchfiles.go, where matched lines are processed before the file:line:match output is formatted. Review internal/searchfiles/searchfiles_test.go and add coverage showing that leading indentation and trailing spaces are retained, then run the searchfiles tests to verify the raw matched line is preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100