Lua Auto Indent is a small program that can neatly indent large amounts of messy code that would normally be tedious work.
I've tested this on all my addons as well as many popular ones (over 60,000 lines) and have had no issues, with that being said this is still not 100% bug free so it's possible it might not indent correctly in some cases.
Please leave a comment if you have any suggestions, feedback or to report a bug.
v1.5 - Sorry for the all the recent updates found 2 new bugs that needed fixing and re-did all the regex patterns for much better optimization.
Do not edit the config.ini or rename the files.
Thank you for using my program. =)
1.5 Optimized all RegEx patterns for speed and fixed a few bugged ones.
Code inside of comment blocks now indent as well
1.4 Remade clunky icons, fixed an issue where certain words inside of quotes or after comments (brackets) caused wrong indenting, added a backup option (program shouldn't misplace any code, but added just to make people feel better.)
Also fixed an issue where blank lines were being added at the end of the new code.
1.3 Added more GUI elements for greater customization, added a quick indent program as well and fixed a few rare bugs.
1.2 Fixed an error where "else" was adding an extra tab in certain cases.
1.1 Fixed an issue where user tabbing after the start of the line was being removed.