File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ enabled=false
1818fnc =remove_line_comments
1919open_tag =//
2020close_tag =$
21+ start_at_line =22
2122
2223# This will remove all multiline comments starting with /* and ending with */
2324[blockComments]
@@ -28,7 +29,7 @@ close_tag=\*/
2829
2930# This will remove all doc comments starting with /** and ending with */
3031[docComments]
31- enabled =false
32+ enabled =true
3233fnc =remove_doc_comments
3334open_tag =/**
3435close_tag =*/
@@ -37,3 +38,8 @@ close_tag=*/
3738[emptyLines]
3839enabled =true
3940fnc =remove_blank_lines
41+
42+ # Removes all leading and trailing spaces and tabs of each line
43+ [trimSpaces]
44+ enabled =false
45+ fnc =trim_spaces
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ remove_block_comments() {
171171remove_doc_comments () {
172172 open_tag=" $( str_escape_given " ${open_tag} " ' *' ) "
173173 close_tag=" $( str_escape_given " ${close_tag} " ' *' ) "
174- local result=" $( perl -0777 -pe " s{\R?${open_tag} .*?${close_tag} }{}sg" " ${output_file} " ) "
174+ local result=" $( perl -0777 -pe " s{\R?${open_tag} .*?${close_tag} }{\n }sg" " ${output_file} " ) "
175175 echo " ${result} " > " ${output_file} "
176176 return 0
177177}
@@ -184,6 +184,13 @@ remove_blank_lines() {
184184}
185185
186186
187+ # # Function to process operation 'trimSpaces'
188+ trim_spaces () {
189+ sed -i ' s/^[ \t]*//;s/[ \t]*$//' " ${output_file} "
190+ return 0
191+ }
192+
193+
187194
188195# ######################################################################################
189196# ## BASIC FUNCTIONS ###
You can’t perform that action at this time.
0 commit comments