##// END OF EJS Templates
Don't strip decorators before feeding into block_parser (#13612)...
Tom Nicholas -
r27681:ccd53253
parent child
Show More
@@ -0,0 +1,4
1 Stripping decorators bug
2 ========================
3
4 Fixed bug which meant that ipython code blocks in restructured text documents executed with the ipython-sphinx extension skipped any lines of code containing python decorators.
@@ -821,8 +821,11 class EmbeddedSphinxShell(object):
821 output.append(line)
821 output.append(line)
822 continue
822 continue
823
823
824 # handle decorators
824 # handle pseudo-decorators, whilst ensuring real python decorators are treated as input
825 if line_stripped.startswith('@'):
825 if any(
826 line_stripped.startswith("@" + pseudo_decorator)
827 for pseudo_decorator in PSEUDO_DECORATORS
828 ):
826 output.extend([line])
829 output.extend([line])
827 if 'savefig' in line:
830 if 'savefig' in line:
828 savefig = True # and need to clear figure
831 savefig = True # and need to clear figure
General Comments 0
You need to be logged in to leave comments. Login now