Repository navigation
Correct the docs on JSON-encoded URLs - #251
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Document JSON-encoded search behavior README.md, src/Search_Replace_Command.php |
The documentation describes matching the JSON-encoded search string for ordinary searches. It states that regex patterns must handle escaped slashes and removes the separate escaped-URL example. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Other
Possibly related PRs
- wp-cli/search-replace-command#248: Documented a separate escaped-slash search pass for JSON URLs, which this PR’s updated guidance removes.
Suggested reviewers: rejaulalomkhan
Merge Risk: 
Minimal · up to 4ec8b
-
No actionable merge risk remains; the documentation correction is ready to merge.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "Correct the docs on JSON-encoded URLs" matches the main change. The PR updates the README and command documentation to say that non-regex search-replace already handles the JSON-encoded form of the search string, that --regex does not get this handling, and that the escaped-slash example was removed. The title is short, specific, and matches the stated objectives of PR
#251.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
#248 documented that a plain search/replace won't match URLs whose slashes are escaped in JSON (
https:\/\/example.com), and told users to run a second pass with escaped slashes.That hasn't been true since #213, which shipped in v3.0.0. It replaces the JSON-encoded form of the search string automatically, in both SQL and PHP mode. #248 then went out in v3.0.2, so the current release has the wrong advice.
This PR:
--regexgets no JSON handling, so a regex pattern has to account for escaped slashes itself;Thanks to @pwtyler for spotting this in #248 (comment).
Summary by CodeRabbit