Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim sibling whitespaces using a preprocessor #973

Merged

Conversation

johanbissemattsson
Copy link
Contributor

@johanbissemattsson johanbissemattsson commented Feb 29, 2024

Description

Solves

Trims sibling whitespaces using a preprocessor which inlines the template code in specified Svelte files (currently only DecoratedData.svelte).

The preprocessor replaces whitespace characters (at the end of a line) and tabs which are followed by Svelte specific logic blocks (by matching their starting characters) or HTML tags.

This preprocessor should be seen as a work-around until sveltejs/svelte#189 is resolved.

An alternative is to manually inline the relevant code in DecoratedData.svelte together with a prettier-ignore block.

Summary of changes

  • Trim sibling whitespaces using a preprocessor

Copy link
Contributor

@olovy olovy left a comment

Choose a reason for hiding this comment

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

Seems to work!
🚢

@johanbissemattsson johanbissemattsson merged commit 4918289 into develop Feb 29, 2024
@johanbissemattsson johanbissemattsson deleted the fix/remove-sibling-whitespaces-preprocessor branch February 29, 2024 12: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.

2 participants