Fix relative links#52
Conversation
|
Warning Review limit reached
More reviews will be available in 11 minutes and 36 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (39)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
This pull request fixes incorrect inline hashtag (#tag) links when rendering entries under nested permalinks by making tag-link generation root-path-aware and ensuring rendered HTML cache keys vary by permalink.
Changes:
- Pass a computed page
rootPath(based on the rendered permalink depth) into the content processing pipeline during entry rendering. - Make
TagLinkProcessorroot-path-aware so inline hashtag links become page-relative (e.g.,../../tags/php/) instead of always/tags/php/. - Include
permalinkin the entry render cache context to prevent cached HTML from containing incorrect page-relative links.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Build/EntryRendererTest.php | Adds coverage ensuring inline tag links use the current page’s computed root path for nested permalinks. |
| src/Processor/TagLinkProcessor.php | Implements root-path awareness so generated tag URLs respect the current rendered page depth. |
| src/Processor/RootPathAwareProcessorInterface.php | Introduces an interface for processors that need a per-render root path context. |
| src/Processor/ContentProcessorPipeline.php | Extends the pipeline to optionally apply a root path to root-path-aware processors before processing. |
| src/Build/EntryRenderer.php | Computes rootPath from permalink, passes it into processing, and adds permalink to cache context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
554a9eb to
25c8bc8
Compare
25c8bc8 to
1ca336c
Compare
Summary
Tests