The results of beautification are not what I expect.
instead, got this:
<div>
<Widget txt={this.state.txt} update={this.update}/>
<p>
Hello
</p>
</div>
The beautified code should have looked like:
<div>
<Widget txt={this.state.txt} update={this.update}/>
</div>
Atom Beautify: Beautify EditorHere is a link to the debug.md Gist: https://gist.github.com/...
debug.md GistNote that this will include a copy of your code.
If your code is private, please create a different sample of code that reproduces the problem.
Atom Beautify: Help Debug Editor.debug.md. debug.md file in your Gist. debug.md Gist to this issueIt would be really helpful if you could generate the debug.md file and save it as a gist. I cannot tell which beautifier or variant of HTML grammar you are using, which makes it challenging to determine which software package could be causing this.
Here is a link to the Gist
https://gist.github.com/thehulke/753c2296fe9590bf0ca0b51fbc8358d2
Please provide this in a separate Gist as not to clutter this Issue. Thank you.
Sure.
Updated earlier comment
any progress?
The problem is in your EditorConfig options under section https://gist.github.com/thehulke/753c2296fe9590bf0ca0b51fbc8358d2#beautification-options :
{
"_default": {
"charset": "utf-8",
"indent_style": "tab",
"end_of_line": "lf",
"insert_final_newline": true,
"trim_trailing_whitespace": true,
"indent_size": "tab",
"indent_char": "\t",
"indent_with_tabs": true
}
}
Notice the indent_size is tab.
EditorConfig does not tell _where_ it found the .editorconfig file so I recommend that you start from your desired file and move upwards until your find it. Then ensure it is correct.
There may be a problem with EditorConfig support in particular. The applicable code can be found at https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/index.coffee#L700-L725 if you are interested in debugging on your own.
Good catch. I was having trouble tracking this down. It looked like a Pretty Diff problem, but I just couldn't reproduce it.
It's not a Pretty Diff problem. Look at the final options generated and given to Pretty Diff: https://gist.github.com/thehulke/753c2296fe9590bf0ca0b51fbc8358d2#final-options
{
"inchar": "\t",
"insize": "tab",
"objsort": false,
"preserve": "all",
"comments": "indent",
"vertical": "none",
"wrap": 0,
"space": false,
"endcomma": false,
"methodchain": true
}
insize:"tab" is clearly wrong :stuck_out_tongue_winking_eye: . It is either EditorConfig or how Atom Beautify is dealing with EditorConfig.
I've had the same problem.
It seems, that atom-beautify is using it's own default options (since the better-settings change) and not atom's editor settings.
To solve the problem, just configure the settings for atom-beautify directly.
P.S. I'm using atom beta with neither .editorconfig nor .jslintrc
It seems, that atom-beautify is using it's own default options (since the better-settings change) and not atom's editor settings.
This is a bug. Please create an issue (including debug.md in Gist as instructed) so I can resolve it ASAP. Thank you!
I've just created an issue (see #894)
+1 on this. In HTML the same happens, I get Tab char instead of space when beautifying, however I didn't see that happening in the editor config. Here's the dump
@chenasraf : In your debug info under EditorConfig Options it has:
{
"_default": {
"charset": "utf-8",
"indent_style": "tab",
"end_of_line": "lf",
"insert_final_newline": true,
"trim_trailing_whitespace": true,
"indent_size": "tab",
"indent_char": "\t",
"indent_with_tabs": true
}
}
I recommend you change your indent_style from tab to resolve this issue.
I did, and it didn't change. I edited the gist, the newest revision should
show it.
On Tue, Apr 5, 2016, 19:29 Glavin Wiechert [email protected] wrote:
@chenasraf https://github.com/chenasraf : In your debug info under EditorConfig
Options it has:{
"_default": {
"charset": "utf-8",
"indent_style": "tab",
"end_of_line": "lf",
"insert_final_newline": true,
"trim_trailing_whitespace": true,
"indent_size": "tab",
"indent_char": "\t",
"indent_with_tabs": true
}
}I recommend you change your indent_style from tab to resolve this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Glavin001/atom-beautify/issues/882#issuecomment-205884535
It still shows that EditorConfig options are using tabs.
I'd recommend using https://github.com/editorconfig/editorconfig-core-js#in-command-line to help find the problematic .editorconfig file.
iv'e set the .editorconfig in my project folder to
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
and it looks great, thanks!
Awesome to hear! Let us know if you have any other questions.