##// END OF EJS Templates
ENH: Update line numbers on suppress consistent with docs
Skipper Seabold -
Show More
@@ -314,13 +314,10 b' class EmbeddedSphinxShell(object):'
314
314
315 ret = []
315 ret = []
316 is_semicolon = False
316 is_semicolon = False
317 store_history = True
318
317
319 for i, line in enumerate(input_lines):
318 for i, line in enumerate(input_lines):
320 if line.endswith(';'):
319 if line.endswith(';'):
321 is_semicolon = True
320 is_semicolon = True
322 if is_suppress:
323 store_history = False
324
321
325 if i==0:
322 if i==0:
326 # process the first input line
323 # process the first input line
@@ -329,12 +326,12 b' class EmbeddedSphinxShell(object):'
329 self.IP.execution_count += 1 # increment it anyway
326 self.IP.execution_count += 1 # increment it anyway
330 else:
327 else:
331 # only submit the line in non-verbatim mode
328 # only submit the line in non-verbatim mode
332 self.process_input_line(line, store_history=store_history)
329 self.process_input_line(line, store_history=True)
333 formatted_line = '%s %s'%(input_prompt, line)
330 formatted_line = '%s %s'%(input_prompt, line)
334 else:
331 else:
335 # process a continuation line
332 # process a continuation line
336 if not is_verbatim:
333 if not is_verbatim:
337 self.process_input_line(line, store_history=store_history)
334 self.process_input_line(line, store_history=True)
338
335
339 formatted_line = '%s %s'%(continuation, line)
336 formatted_line = '%s %s'%(continuation, line)
340
337
General Comments 0
You need to be logged in to leave comments. Login now