Skip to content

Formatter: Extract Text Flow Engine#1267

Merged
marcoroth merged 1 commit into
mainfrom
text-flow-engine
Mar 2, 2026
Merged

Formatter: Extract Text Flow Engine#1267
marcoroth merged 1 commit into
mainfrom
text-flow-engine

Conversation

@marcoroth

@marcoroth marcoroth commented Mar 2, 2026

Copy link
Copy Markdown
Owner

This pull request extracts the text flow formatting system from FormatPrinter into a dedicated TextFlowEngine class and pure helper functions. The text flow system handles formatting of mixed text + inline elements + ERB content with intelligent word wrapping and punctuation handling.

This is mostly motived be the number of bugs we have seen around inline text formatting and punctuation. Related issues:

The hope is that, extracting the text flow engine, makes the formatter easier to test and reason about.

@pkg-pr-new

pkg-pr-new Bot commented Mar 2, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@1267
npx https://pkg.pr.new/@herb-tools/language-server@1267
npx https://pkg.pr.new/@herb-tools/linter@1267

commit: 65d848e

@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 65d848e


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth added this to the v1.0.0 milestone Mar 2, 2026
@marcoroth marcoroth merged commit 3b2376d into main Mar 2, 2026
20 checks passed
@marcoroth marcoroth deleted the text-flow-engine branch March 2, 2026 15:14
marcoroth added a commit that referenced this pull request Mar 2, 2026
marcoroth added a commit that referenced this pull request Mar 2, 2026
marcoroth added a commit that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant