diff options
| -rw-r--r-- | example/demo.rst | 19 | ||||
| -rw-r--r-- | presentty/rst.py | 10 | 
2 files changed, 28 insertions, 1 deletions
| diff --git a/example/demo.rst b/example/demo.rst index b7ee4bb..ad8ae77 100644 --- a/example/demo.rst +++ b/example/demo.rst | |||
| @@ -68,6 +68,25 @@ Table | |||
| 68 | F T | 68 | F T | 
| 69 | === === | 69 | === === | 
| 70 | 70 | ||
| 71 | Line Blocks | ||
| 72 | =========== | ||
| 73 | | | ||
| 74 | | I bring fresh showers for the thirsting flowers, | ||
| 75 | | From the seas and the streams; | ||
| 76 | | I bear light shade for the leaves when laid | ||
| 77 | | In their noonday dreams. | ||
| 78 | | From my wings are shaken the dews that waken | ||
| 79 | | The sweet buds every one, | ||
| 80 | | When rocked to rest on their mother's breast, | ||
| 81 | | As she dances about the sun. | ||
| 82 | | I wield the flail of the lashing hail, | ||
| 83 | | And whiten the green plains under, | ||
| 84 | | And then again I dissolve it in rain, | ||
| 85 | | And laugh as I pass in thunder. | ||
| 86 | | | ||
| 87 | |||
| 88 | (From "The Cloud", Percy Bysshe Shelley) | ||
| 89 | |||
| 71 | Dissolve Transition | 90 | Dissolve Transition | 
| 72 | =================== | 91 | =================== | 
| 73 | Transitions may be "dissolve," where one slide cross-fades into the next... | 92 | Transitions may be "dissolve," where one slide cross-fades into the next... | 
| diff --git a/presentty/rst.py b/presentty/rst.py index b4258da..5867ca1 100644 --- a/presentty/rst.py +++ b/presentty/rst.py | |||
| @@ -253,11 +253,19 @@ class UrwidTranslator(docutils.nodes.GenericNodeVisitor): | |||
| 253 | pad = slide.SlidePadding(text, width='pack') | 253 | pad = slide.SlidePadding(text, width='pack') | 
| 254 | self._append(node, pad, 'pack') | 254 | self._append(node, pad, 'pack') | 
| 255 | 255 | ||
| 256 | def visit_line_block(self, node): | ||
| 257 | self.stack.append(slide.SlidePile([])) | ||
| 258 | |||
| 259 | def depart_line_block(self, node): | ||
| 260 | pile = self.stack.pop() | ||
| 261 | pad = slide.SlidePadding(pile, left=2) | ||
| 262 | self._append(node, pad, 'pack') | ||
| 263 | |||
| 256 | visit_line = visit_textelement | 264 | visit_line = visit_textelement | 
| 257 | 265 | ||
| 258 | def depart_line(self, node): | 266 | def depart_line(self, node): | 
| 259 | text = self.stack.pop() | 267 | text = self.stack.pop() | 
| 260 | self._append(node, urwid.Text(text.getFormattedText(), wrap='clip'), | 268 | self._append(node, urwid.Text(text.getFlowedText(), wrap='clip'), | 
| 261 | 'pack') | 269 | 'pack') | 
| 262 | 270 | ||
| 263 | visit_title = visit_textelement | 271 | visit_title = visit_textelement | 
