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

Whitespace not preserved in code viewer #81

Open
bmuenzenmeyer opened this issue Oct 6, 2017 · 4 comments
Open

Whitespace not preserved in code viewer #81

bmuenzenmeyer opened this issue Oct 6, 2017 · 4 comments

Comments

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Oct 6, 2017

image

not sure if this is something on the CSS end @bradfrost but I sorta doubt it
thoughts?

@bmuenzenmeyer bmuenzenmeyer added this to the vNext milestone Oct 6, 2017
@sghoweri
Copy link

sghoweri commented Oct 8, 2017

What if the output was automatically beautified (both the HTML and template tags) before the files are written out to the file system?

That's what I ended up doing on the Drupal Pattern Lab / PHP side of things this past week to keep things simple while also not having things look like crap either.

@bradfrost
Copy link
Member

What if the output was automatically beautified (both the HTML and template tags) before the files are written out to the file system?

I think that's a smart option (and perhaps even a smart default), but I want to be mindful that some teams might have their code structured a certain way for certain reasons. Bulldozing their conventions might not be a good idea, so I'd say if we were to beautify things there would need to be a flag to turn it on/off.

@sghoweri
Copy link

sghoweri commented Oct 8, 2017

@bradfrost agreed - and I'm actually glad you brought up perhaps having this as a default (but with a config option to disable if need be so we aren't unintentionally introducing a breaking change without a workaround)

Perhaps we can tackle this once the CSS rearchitecture work is wrapped up?

@bmuenzenmeyer
Copy link
Member Author

FWIW Pattern Lab Node does an automatic beautification and it was expensive and did trounce on people's styles. We do allow it be turned on and off with a flag. perhaps we could find an editorconfig-aware solution

whitespace not being preserved is different, IMO, that beautification. The current behavior is a bug. line breaks / carriage returns used to be preserved

labeling this "spec write up needed" as we should probably formalize this behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants