-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
feat: Fragment identifier full line ignore #2626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
@jacobsorme is attempting to deploy a commit to the Docsify Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new :fragmentFullLine option that enables full-line exclusion of fragment identifier lines when embedding file fragments. When enabled, the entire line containing the fragment marker (e.g., /// [demo] comment text) is excluded from the embedded content, not just the marker itself.
Key Changes:
- Added
fragmentFullLineparameter toextractFragmentContentfunction and updated regex logic to support full-line matching - Updated compiler to pass through
fragmentFullLineconfiguration - Fixed grammar in media error messages ("Not Support" → "Not Supported")
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/integration/example.test.js | Added integration test verifying full-line fragment exclusion behavior |
| src/core/render/embed.js | Modified extractFragmentContent to accept and handle fullLine parameter with updated regex logic |
| src/core/render/compiler.js | Added fragmentFullLine property assignment to embed configuration |
| src/core/render/compiler/media.js | Fixed grammar in video and audio error messages |
| docs/embed-files.md | Documented the new :fragmentFullLine option |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
New option
:fragmentFullLinethat when used will enable full-line ignore of file embed fragment lines.Related issue, if any:
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Tested in the following browsers: