##// END OF EJS Templates
Fixed restarting cell to (-) type. Added a final point to the while cycle.
damianavila -
Show More
@@ -49,20 +49,22 b' class RevealHelpPreprocessor(Preprocessor):'
49 49 #Make sure the cell has slideshow metadata.
50 50 cell.metadata.slide_type = cell.get('metadata', {}).get('slideshow', {}).get('slide_type', '-')
51 51
52 #Get the slide type. If type is start of subslide or slide,
52 #Get the slide type. If type is start of subslide or slide,
53 53 #end the last subslide/slide.
54 54 if cell.metadata.slide_type in ['slide']:
55 55 worksheet.cells[index - 1].metadata.slide_helper = 'slide_end'
56 56 if cell.metadata.slide_type in ['subslide']:
57 57 worksheet.cells[index - 1].metadata.slide_helper = 'subslide_end'
58 #Prevent the rendering of "do nothing" cells before fragments
58 59 if cell.metadata.slide_type in ['fragment']:
59 try:
60 i = 1
61 while 1:
62 worksheet.cells[index + i].metadata.frag_helper = 'fragment_end'
63 i += 1
64 except IndexError as e:
65 pass #Last cell doesn't have a next one
60 i = 1
61 while i < len(worksheet.cells) - index:
62 worksheet.cells[index + i].metadata.frag_helper = 'fragment_end'
63 i += 1
64 #Restart the slide_helper when the cell status is changed
65 #to "do nothing".
66 if cell.metadata.slide_type in ['-']:
67 worksheet.cells[index - 1].metadata.slide_helper = '-'
66 68
67 69 if not isinstance(resources['reveal'], dict):
68 70 resources['reveal'] = {}
General Comments 0
You need to be logged in to leave comments. Login now