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

Feature: Whitespace control #127

Open
mahor1221 opened this issue Jul 31, 2023 · 1 comment
Open

Feature: Whitespace control #127

mahor1221 opened this issue Jul 31, 2023 · 1 comment

Comments

@mahor1221
Copy link

Consider adding a way to preserve or suppress whitespace, similar to Askama.

This feature is useful in a situation like the following:

# without whitespace control
class User(BaseModel):
    
    
    name: str
    
    
    

class UserEvent(BaseModel):
    
    
    pass
    
    

    

    
# with whitespcae control
class User(BaseModel):
    name: str

class UserEvent(BaseModel):
    pass
@PaulDotSH
Copy link
Contributor

Consider adding a way to preserve or suppress whitespace, similar to Askama.

This feature is useful in a situation like the following:

# without whitespace control
class User(BaseModel):
    
    
    name: str
    
    
    

class UserEvent(BaseModel):
    
    
    pass
    
    

    

    
# with whitespcae control
class User(BaseModel):
    name: str

class UserEvent(BaseModel):
    pass

This can be done with my new crate https://crates.io/crates/sailfish-minify

However it would require a custom command since it only works with html files by default, if you still need help I'd be open to help

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

No branches or pull requests

2 participants