lua-comment-cleaner is a Python script that removes single-line and multi-line comments from Lua files while preserving the code structure and indentation.
- Supports removing nested multi-line comments with different levels of equal signs between the brackets.
- Clone this repository or download the
clean_comments.pyfile.
git clone https://github.com/DiNaSoR/lua-comment-cleaner.git-
Place the
clean_comments.pyscript in the same directory as the Lua file you want to clean. -
Run the script, specifying the input Lua file and the output file.
python clean_comments.py input.lua output.luaReplace input.lua with the name of your Lua file and output.lua with the desired output file name.
This project is licensed under the MIT License. See the LICENSE file for details.