Skip to content

Feat/df 480 - demote h1 in markdown#246

Merged
jbarnsley10 merged 9 commits intomainfrom
feat/DF-480-demote-h1
Nov 25, 2025
Merged

Feat/df 480 - demote h1 in markdown#246
jbarnsley10 merged 9 commits intomainfrom
feat/DF-480-demote-h1

Conversation

@jbarnsley10
Copy link
Contributor

@jbarnsley10 jbarnsley10 commented Nov 13, 2025

Proposed change

Demotes any H1-6 from the starting level supplied. For example, if the starting level is 2, any H1's will become H2's, H2's will become H3's etc. If the starting level is 3, any H1's will become H3's and so on.
This is to ensure there is only one H1 on the page (either the page/component title, or an H1 from within the markdown), and that the rest of the page's heading flow down in order.

This PR is dependent on forms-designer PR DEFRA/forms-designer#1197 for the markdown renderer method in forms-model

Jira ticket: DF-480

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@jbarnsley10 jbarnsley10 marked this pull request as ready for review November 13, 2025 15:00
Copy link
Contributor

@alexluckett alexluckett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes requested in designer pr

@sonarqubecloud
Copy link

@jbarnsley10 jbarnsley10 merged commit f16692e into main Nov 25, 2025
23 checks passed
@jbarnsley10 jbarnsley10 deleted the feat/DF-480-demote-h1 branch November 25, 2025 10:16
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.

3 participants