##// END OF EJS Templates
Don't strip decorators before feeding into block_parser (#13612)...
Tom Nicholas -
Show More
@@ -0,0 +1,4 b''
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 b' class EmbeddedSphinxShell(object):'
821 821 output.append(line)
822 822 continue
823 823
824 # handle decorators
825 if line_stripped.startswith('@'):
824 # handle pseudo-decorators, whilst ensuring real python decorators are treated as input
825 if any(
826 line_stripped.startswith("@" + pseudo_decorator)
827 for pseudo_decorator in PSEUDO_DECORATORS
828 ):
826 829 output.extend([line])
827 830 if 'savefig' in line:
828 831 savefig = True # and need to clear figure
General Comments 0
You need to be logged in to leave comments. Login now