Skip to content

Formatter: Skip formatting Scaffold Templates#771

Merged
marcoroth merged 1 commit intomainfrom
formatter-scaffold-templates
Nov 3, 2025
Merged

Formatter: Skip formatting Scaffold Templates#771
marcoroth merged 1 commit intomainfrom
formatter-scaffold-templates

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Nov 3, 2025

This pull request adds a visitor to detect if a given ParseResult contains escaped <%% or <%%= tags, which are typically used in Rails Scaffold Templates.

In the case of a scaffold template we abort the formatting and just return the original source, since we cannot reliably tell how to format a scaffold template properly, yet.

Resolves #673

@marcoroth marcoroth added the bug Something isn't working label Nov 3, 2025
@marcoroth marcoroth merged commit b19834d into main Nov 3, 2025
12 checks passed
@marcoroth marcoroth deleted the formatter-scaffold-templates branch November 3, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatter: Scaffold Templates

1 participant