@@ -93,30 +93,17 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
93
93
if comment_idx >= 0 :
94
94
no_comment_line = line [:comment_idx ]
95
95
text_filehandle .write (line [comment_idx + 2 :])
96
- < << << << HEAD
97
-
98
96
if (not has_actual_code
99
97
and not line .strip ().startswith ('//' )
100
98
and not line .strip ().startswith ('???' )
101
- and not line .strip () == '' ):
99
+ and not line .strip () == '' ):
102
100
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
110
101
else :
111
102
# write empty line so line numbers stay stable
112
103
text_filehandle .write ('\n ' )
113
104
114
105
if (not line .strip () == '```' ):
115
- < << << << HEAD
116
106
if ('???' == no_comment_line or '...' == no_comment_line ):
117
- == == == =
118
- if ('???' in no_comment_line or '...' in no_comment_line ):
119
- > >> >> >> 180 cd89a1f3105a20e79b81964b4d388dca94040
120
107
has_question_marks = True
121
108
linebuffer .append (dedent (line ) if not fenced else line )
122
109
try :
@@ -127,12 +114,7 @@ def process_code(read_filehandle, text_filehandle, line, linenum, sourcefile, co
127
114
break
128
115
codefile = os .path .join (codedir , '%s%s.cpp' % (name , index ))
129
116
if fenced :
130
- < << << << HEAD
131
- text_filehandle .write ('' )
132
- == == == =
133
117
text_filehandle .write ('\n ' )
134
-
135
- >> >> >> > 180 cd89a1f3105a20e79b81964b4d388dca94040
136
118
if (has_actual_code and not has_question_marks ):
137
119
# add commonly used headers, so that lines can compile
138
120
with io .open (codefile , 'w' ) as code_filehandle :
0 commit comments