@@ -93,30 +93,17 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
9393 if comment_idx >= 0 :
9494 no_comment_line = line [:comment_idx ]
9595 text_filehandle .write (line [comment_idx + 2 :])
96- < << << << HEAD
97-
9896 if (not has_actual_code
9997 and not line .strip ().startswith ('//' )
10098 and not line .strip ().startswith ('???' )
101- and not line .strip () == '' ):
99+ and not line .strip () == '' ):
102100 has_actual_code = True
103- == == == =
104- if (not has_actual_code
105- and not line .strip ().startswith ('//' )
106- and not line .strip ().startswith ('???' )
107- and not line .strip () == '' ):
108- has_actual_code = True
109- > >> >> >> 180 cd89a1f3105a20e79b81964b4d388dca94040
110101 else :
111102 # write empty line so line numbers stay stable
112103 text_filehandle .write ('\n ' )
113104
114105 if (not line .strip () == '```' ):
115- < << << << HEAD
116106 if ('???' == no_comment_line or '...' == no_comment_line ):
117- == == == =
118- if ('???' in no_comment_line or '...' in no_comment_line ):
119- > >> >> >> 180 cd89a1f3105a20e79b81964b4d388dca94040
120107 has_question_marks = True
121108 linebuffer .append (dedent (line ) if not fenced else line )
122109 try :
@@ -127,12 +114,7 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
127114 break
128115 codefile = os .path .join (codedir , '%s%s.cpp' % (name , index ))
129116 if fenced :
130- < << << << HEAD
131- text_filehandle .write ('' )
132- == == == =
133117 text_filehandle .write ('\n ' )
134-
135- >> >> >> > 180 cd89a1f3105a20e79b81964b4d388dca94040
136118 if (has_actual_code and not has_question_marks ):
137119 # add commonly used headers, so that lines can compile
138120 with io .open (codefile , 'w' ) as code_filehandle :
0 commit comments