You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, I see that if I switch to purely spaces for indentation.
The script uses tab characters to re-indent, and Sublime Text automatically converts the tabs to spaces if that is how your settings are set up… You can test things working properly if you switch/convert to tab-indentation temporarily, then run the script.
It will would be great to update the script to read the user indentation settings (tab vs. spaces) then, use that method of indenting to prevent the behavior you have mentioned. (I am currently pretty busy with paying work, so I can't devote time to it yet!)
The unsatisfying workaround is to add <pre> to the ignore settings:
// indicates tags whose contents should be ignored (add more as needed)
"ignored_tag_opening" : "<script|<style|<!--|{\\*|<\\?php|<pre",
// indicates when to stop ignoring
"ignored_tag_closing" : "</script|</style|-->|\\*}|\\?>|</pre",
Yes I noticed that too, that sometimes indentation and newlines would be gone. But sometimes also not (like above). But I couldn't really figure out when and why. Ignoring the contents actually sounds right to me.
Before
Reformat 1
The
<pre>
is already a little offReformat 2
My
HTMLBeautify.sublime-settings
are empty. Using Sublime Text 3.1.1. Build 3176.The text was updated successfully, but these errors were encountered: