Test that top (current) level is of given state.
(self, state)
| 28 | self.pop() |
| 29 | |
| 30 | def isstate(self, state): |
| 31 | """ Test that top (current) level is of given state. """ |
| 32 | if len(self): |
| 33 | return self[-1] == state |
| 34 | else: |
| 35 | return False |
| 36 | |
| 37 | class BlockParser: |
| 38 | """ Parse Markdown blocks into an ElementTree object. |