Skip to content

Simple collection of scripts in multiple languages to remove trailing newlines and comments

Notifications You must be signed in to change notification settings

ptr-dodge/format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Format

Remove comments and trailing newlines

Single line comments:

  • #

  • '

  • //

  • """

  • '''

  • rem

  • --

  • ;

Multiline comments:

  • /* ... */

  • <-- ... -->

  • (* ... *)

  • ''' ... '''

  • """ ... """

Clone the repo:

git clone https://github.com/ptr-dodge/format.git

Alternativley, (personally preferred)


gh repo clone ptr-dodge/format

Bash

Use the bash script

chmod +x ./format.sh
./format.sh file_to_format

Python

Use the python script

python format.py file_to_format

Powershell

Use the powershell script

./format.ps1 file_to_format

Lua

Use the lua script

lua format.lua file_to_format

Todo: add command to add to path

About

Simple collection of scripts in multiple languages to remove trailing newlines and comments

Topics

Resources

Stars

Watchers

Forks