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

can config pug pretty mode #2490

Closed
wants to merge 4 commits into from
Closed

can config pug pretty mode #2490

wants to merge 4 commits into from

Conversation

miewx
Copy link
Contributor

@miewx miewx commented Jan 1, 2019

pug will add space between inline block element ( see pugjs/pug#2682 ) where use pretty:true, then there will be space in page .

so , I think should let user can config pretty:false for the visual effect development

pug will add space between inline block element  ( see pugjs/pug#2682 ) where use pretty:true, then there will be space in page .

so , I think should let user can config pretty:false for the  visual effect development
@mischnic
Copy link
Member

mischnic commented Jan 1, 2019

You need to run npx prettier --write packages/core/parcel-bundler/src/assets/PugAsset.js to make the tests pass

@miewx
Copy link
Contributor Author

miewx commented Jan 2, 2019

You need to run npx prettier --write packages/core/parcel-bundler/src/assets/PugAsset.js to make the tests pass

done

@devongovett
Copy link
Member

Perhaps we should just remove the pretty option altogether (unless in the config)? From the issue you linked:

Do not pass {pretty: true}, it breaks lots of things and as such we generally view it as unsupported.

@mischnic
Copy link
Member

Perhaps we should just remove the pretty option altogether

https://pugjs.org/api/reference.html#options:

pretty: boolean | string
[Deprecated.] Adds whitespace to the resulting HTML to make it easier for a human to read using ' ' as indentation. If a string is specified, that will be used as indentation instead (e.g. '\t'). We strongly recommend against using this option. Too often, it creates subtle bugs in your templates because of the way it alters the interpretation and rendering of whitespace, and so this feature is going to be removed. Defaults to false.

@devongovett
Copy link
Member

Closed by #2582.

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.

None yet

4 participants