Skip to content

feat(core/sections): allow heading to use section markers - #5029

Merged
sidvishnoi merged 8 commits into
mainfrom
section_headers
Aug 12, 2025
Merged

feat(core/sections): allow heading to use section markers#5029
sidvishnoi merged 8 commits into
mainfrom
section_headers

Conversation

@marcoscaceres

Copy link
Copy Markdown
Contributor

Closes #5022

@netlify

netlify Bot commented Aug 6, 2025

Copy link
Copy Markdown

Deploy Preview for respec-pr ready!

Name Link
🔨 Latest commit c4fa2aa
🔍 Latest deploy log https://app.netlify.com/projects/respec-pr/deploys/689b2aa4d7e82b000757941a
😎 Deploy Preview https://deploy-preview-5029--respec-pr.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@marcoscaceres
marcoscaceres requested a review from Copilot August 6, 2025 05:06

This comment was marked as outdated.

@marcoscaceres
marcoscaceres requested a review from Copilot August 6, 2025 05:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enables heading elements to use section marker classes that get copied to their corresponding section elements. The feature allows headings to be marked with classes like "appendix", "informative", and "notoc" which are then automatically applied to the generated section wrappers.

Key changes:

  • Added logic to copy specific header classes to section elements
  • Defined a set of allowed section classes that can be transferred
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/core/sections.js Implements the core functionality to copy section marker classes from headers to sections
tests/spec/core/sections-spec.js Adds test cases to verify class copying behavior and section type handling

Comment thread tests/spec/core/sections-spec.js Outdated
marcoscaceres and others added 2 commits August 6, 2025 16:10
@sidvishnoi
sidvishnoi merged commit 3c5407f into main Aug 12, 2025
11 checks passed
@sidvishnoi
sidvishnoi deleted the section_headers branch August 12, 2025 11:53
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.

Allow heading to be marked as informative

3 participants