Comments (3)
It's a weird issue I haven't really looked into. I'm not sure if it's the way I implemented in brackets or an actual beautify-css bug. The issue is if you have a space in the beginning of your document. If you take that space out it will format correctly. Let me know if that fixes it. Thanks.
from brackets-beautify.
Yeah that's the exact bug,
i sorted it out by changing
var indentString = source_text.match(/^[\r\n]*[\t ]*/)[0];
to
var indentString = source_text.trim().match(/^[\r\n]*[\t ]*/)[0];
in beautify-css.js
Not sure if this have some side effect but that auto remove the space in beginning of the document and allow a good formating.
from brackets-beautify.
On retesting, it seems fixed in the latest version of the library.
from brackets-beautify.
Related Issues (20)
- Mapping Nunjucks (njk) to HTML HOT 1
- Extra space added at the end of the tag HOT 3
- brackets-beautify inserts a space in import(...) HOT 1
- not beautifying certain tags in html HOT 2
- SVG file seems to be ignored HOT 1
- Annoying space char HOT 1
- Error SAVE BEAUTIFY in ASP HOT 5
- Beautifier is breaking css urls HOT 2
- Move brackets-beautify to beautifier github org HOT 1
- HTML inside JS in an HTML document break when formatted during Live Preview HOT 8
- Beautify inserts space before exclamation mark in comment <!-- in <style> HOT 2
- Brackets Beautify scrambles IIFE style JS code HOT 2
- php variable inside a js script is being formatted HOT 4
- Can't beautify php HOT 3
- Feature request: python formatting HOT 1
- Preserve Tab Spacing inside tags HOT 1
- JSX support HOT 7
- Extra space added in nullish coalescing operator (??) for javascript HOT 8
- No line break on beautify for XML element if tag name is 'code' HOT 1
- How to download the extension as a zip
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-beautify.