Issue with indentation in HAML-"rest of document was indented using 2 spaces"
Solution 1
I think you should use either space or tab, or you can select all and convert into spaces once finish your code, SUBLIME text editor is best for it
Solution 2
If you're using SublimeText, add the following to Packages/User/Preferences.sublime-settings
"tab_size": 2,
"translate_tabs_to_spaces": true
... then re-paste the code and all tabs will be changed to spaces.
![Nubtacular](https://i.stack.imgur.com/FdMdK.jpg?s=256&g=1)
Nubtacular
Updated on June 04, 2022Comments
-
Nubtacular about 2 years
I would have posted this in a Github Gist or using Tinkerbin, but the indentation appears WAY off when I copy and paste my HAML.
The error message is: Inconsistent indentation: "\t\t " was used for indentation, but the rest of the document was indented using 2 spaces.
I posted an imgur to show you where the error is happening, the browser is telling me line 8, as you can see in the photo.
Bear with me, this is probably an easy fix but I am very new to HAML.