Skip to content

Conversation

@jacobsorme
Copy link
Contributor

Summary

New option :fragmentFullLine that when used will enable full-line ignore of file embed fragment lines.

Related issue, if any:

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

  • Yes
  • No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
@vercel
Copy link

vercel bot commented Nov 10, 2025

@jacobsorme is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Nov 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docsify-preview Ready Ready Preview Comment Nov 12, 2025 2:34am
@sy-records sy-records changed the title Fragment identifier full line ignore feat: Fragment identifier full line ignore Nov 11, 2025
Copilot finished reviewing on behalf of sy-records November 11, 2025 02:39
Copy link

Copilot AI left a 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 fragmentFullLine parameter to extractFragmentContent function and updated regex logic to support full-line matching
  • Updated compiler to pass through fragmentFullLine configuration
  • 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.

jacobsorme and others added 4 commits November 11, 2025 10:53
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants