Skip to content

fix(format): preserve indentation on recipe continuation lines - #32

Merged
owenrumney merged 1 commit into
mainfrom
fix/formatting-for-multiline
Aug 11, 2026
Merged

owenrumney merged 1 commit into
mainfrom
fix/formatting-for-multiline

Conversation

@owenrumney

Copy link
Copy Markdown
Owner

The formatter flattened every recipe line to a single tab, discarding the extra indentation authors use on backslash continuations. Make only
strips the first tab, so the remaining whitespace is passed to the shell, thehe reindent was a semantic change, not just cosmetic.

Track continuation state across lines and, for continuations, keep the leading whitespace verbatim while still guaranteeing the tab.

Non-continuation recipe lines are normalised as before, so neither indentation style is imposed.

Resolves #31

The formatter flattened every recipe line to a single tab, discarding
the extra indentation authors use on backslash continuations. Make only
strips the first tab, so the remaining whitespace is passed to the
shell.  The reindent was a semantic change, not just cosmetic.

Track continuation state across lines and, for continuations, keep the
leading whitespace verbatim while still guaranteeing the tab.

Non-continuation recipe lines are normalised as before, so neither
indentation style is imposed.
@owenrumney
owenrumney marked this pull request as ready for review August 11, 2026 10:32
@owenrumney
owenrumney merged commit 72612cd into main Aug 11, 2026
3 checks passed
@owenrumney
owenrumney deleted the fix/formatting-for-multiline branch August 11, 2026 10:32
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.

Continuations in recipes are not indented

1 participant