Fix camel case, more descriptive function name

This commit is contained in:
Rishabh Raj
2014-04-13 12:42:30 +05:30
parent 1e34359f04
commit 0c9ee09f04
+2 -2
View File
@@ -38,7 +38,7 @@ class Notebook():
# Adds an extra newline at the end, which aids in extraction of text segments
self.code.append('\n')
def getModifiedCode(self):
def filter_continous_duplication(self):
""" Clusters multiple '\n's into one.
For ex - 'import xyz\n\n\n print 2' becomes 'import xyz\n print 2' """
modified_code = []
@@ -78,7 +78,7 @@ def save_ipython_notebook(example_file, notebook_dir, notebook_path):
docstring = False
source = []
modified_code = nb.getModifiedCode()
modified_code = nb.filter_continous_duplication()
for line in modified_code:
# A linebreak indicates a segment has ended. If the text segment had only comments, then source is blank,