Skip to content

feat(rg): add multiline mode - #1664

Merged
chaliy merged 1 commit into
mainfrom
2026-05-22-rg-multiline
May 22, 2026
Merged

chaliy merged 1 commit into
mainfrom
2026-05-22-rg-multiline

Conversation

@chaliy

@chaliy chaliy commented May 22, 2026

Copy link
Copy Markdown
Contributor

What

Add rg -U/--multiline and --multiline-dotall support.

Why

Real ripgrep can match patterns across line boundaries, rejects literal newlines without multiline mode, and supports dotall matching in multiline mode. Bashkit rg was still line-scoped.

How

  • Add multiline flags and help coverage.
  • Compile rg regexes with dotall only when multiline dotall is enabled.
  • Add a multiline match path over full file content with line-span output, counts, only-matching, replacement, passthru/context/basic JSON handling.
  • Add real-rg differential cases for newline patterns, line numbers, counts, only matching, replacement, dotall toggles, and no-multiline toggling.

Risk

  • Medium
  • Touches rg matching/output control flow; covered by focused rg tests, data-driven real-rg differential cases, and full pre-pr.

Checklist

  • Tests added or updated
  • Backward compatibility considered

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
bashkit b13239e Commit Preview URL May 22 2026, 08:10 AM

@chaliy
chaliy merged commit 52282d3 into main May 22, 2026
34 checks passed
@chaliy
chaliy deleted the 2026-05-22-rg-multiline branch May 22, 2026 08:22
chaliy added a commit that referenced this pull request May 30, 2026
## What
Add rg -U/--multiline and --multiline-dotall support.

## Why
Real ripgrep can match patterns across line boundaries, rejects literal
newlines without multiline mode, and supports dotall matching in
multiline mode. Bashkit rg was still line-scoped.

## How
- Add multiline flags and help coverage.
- Compile rg regexes with dotall only when multiline dotall is enabled.
- Add a multiline match path over full file content with line-span
output, counts, only-matching, replacement, passthru/context/basic JSON
handling.
- Add real-rg differential cases for newline patterns, line numbers,
counts, only matching, replacement, dotall toggles, and no-multiline
toggling.

## Risk
- Medium
- Touches rg matching/output control flow; covered by focused rg tests,
data-driven real-rg differential cases, and full pre-pr.

## Checklist
- [x] Tests added or updated
- [x] Backward compatibility considered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant