891d4ddf967eeea38f32ade7ba458dea10738edf
9 def removeComments(self
, data
):
14 for line
in data
.split("\n"):
15 docstring_end
= ("#docstring_end" in line
)
16 if "#docstring_begin" in line
:
17 ret
+= "//DOCSTRING_PLACEHOLDER\n"
20 if(in_docstring
== False):
23 if(not docstring_end
):
24 docstring
+= line
+ "\n"
27 self
.docstrings
+= [docstring
]
31 def insertDocstrings(self
, data
):
34 for line
in data
.split("\n"):
35 if("//DOCSTRING_PLACEHOLDER" in line
):
37 ret
+= self
.docstrings
[docstring_counter
]
40 docstring_counter
+= 1
42 ret
+= "#"+line
+ "\n"