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