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.py
file.
git clone https://github.com/DiNaSoR/lua-comment-cleaner.git
-
Place the
clean_comments.py
script 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.lua
Replace 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.