Skip to content

Strip common indentation from descriptions - #586

Merged
davidjgoss merged 3 commits into
mainfrom
dedent-descriptions
Nov 27, 2026
Merged

davidjgoss merged 3 commits into
mainfrom
dedent-descriptions

Conversation

@davidjgoss

@davidjgoss davidjgoss commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

🤔 What's changed?

When rendering a description, trim common indentation first.

⚡️ What's your motivation?

Indentation from the source file is retained by the Gherkin parser (at least before cucumber/gherkin#26). If we pass this to our Markdown tooling as-is, we see things like 4-space indents being interpreted as code blocks.

Fixes cucumber/html-formatter#494, fixes cucumber/html-formatter#294.

(If we shift this to the parser, we should still retain this for backwards-compatibility in the Reports service.)

🏷️ What kind of change is this?

  • 🐛 Bug fix (non-breaking change which fixes a defect)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Deploying react-components with  Cloudflare Pages  Cloudflare Pages

Latest commit: a242606
Status: ✅  Deploy successful!
Preview URL: https://7f8b899e.react-components-9pg.pages.dev
Branch Preview URL: https://dedent-descriptions.react-components-9pg.pages.dev

View logs

@davidjgoss
davidjgoss marked this pull request as ready for review November 27, 2026 08:33
@davidjgoss
davidjgoss merged commit 51e3049 into main Nov 27, 2026
4 checks passed
@davidjgoss
davidjgoss deleted the dedent-descriptions branch November 27, 2026 08:34
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.

Bug / Nuance - Styling for Documentation in "Rule" Description has different font Markdown in gherkin doesn't work

1 participant