From 5ed0e754246b5c147512542241432a13be80c1e3 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 3 Jun 2018 18:44:54 +0000 Subject: [PATCH] do not use sexy comments for ruby (ruby is sexy enough even without it) --- lib/beautifier.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/beautifier.py b/lib/beautifier.py index a086f9a..f4b5e69 100644 --- a/lib/beautifier.py +++ b/lib/beautifier.py @@ -205,7 +205,6 @@ def _run_vim_script(script_lines, text_lines): return open(textfile.name, "r").read() def _commenting_script(lines_blocks, filetype): - script_lines = [] block_start = 1 for block in lines_blocks: @@ -215,7 +214,7 @@ def _commenting_script(lines_blocks, filetype): if block[0] == 0: comment_type = 'sexy' - if block_end - block_start < 1: + if block_end - block_start < 1 or filetype == 'ruby': comment_type = 'comment' script_lines.insert(0, "%s,%s call NERDComment(1, '%s')"