aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/literasc.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/literasc.py b/plugins/literasc.py
index f0b8cc4..5c5b80e 100755
--- a/plugins/literasc.py
+++ b/plugins/literasc.py
@@ -20,7 +20,7 @@ def format_text(text):
def format_code(lang, code):
if code.strip() == '':
return code
-
+
head = '[source,%s]' % lang
sep = '-' * len(head) + '\n'
return head + '\n' + sep + code.strip('\n') + '\n' + sep
@@ -49,7 +49,7 @@ def format_c_source(filename, file):
n_stars += 1
else:
if n_stars > 1:
- output += format_code('c', chunk[0:len(chunk)-1])
+ output += format_code('c', chunk[0:len(chunk) - 1])
chunk = ''
in_comment = True
else:
@@ -57,9 +57,9 @@ def format_c_source(filename, file):
in_comment_start = False
elif in_comment and prev_c == '*' and c == '/':
if n_stars > 1:
- output += format_text(chunk[0:len(chunk)-1])
+ output += format_text(chunk[0:len(chunk) - 1])
else:
- output += format_code('c', '/* ' + chunk[0:len(chunk)-1] + '*/')
+ output += format_code('c', '/* ' + chunk[0:len(chunk) - 1] + '*/')
in_comment = False
in_comment_start = False
chunk = ''
@@ -115,10 +115,10 @@ def gen(out, filenames):
out.write('\n')
else:
sys.stderr.write("Unknown source format `%s'" % (
- filename[filename.find('.'):]))
+ filename[filename.find('.'):]))
file.close()
-
+
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.stderr.write('Usage: %s FILENAME...\n' % sys.argv[1])