Process blocks of markdown text and attach to given etree node. Given a list of ``blocks``, each blockprocessor is stepped through until there are no blocks left. While an extension could potentially call this method directly, it's generally expected to be used int
(self, parent, blocks)
| 75 | self.parseBlocks(parent, text.split('\n\n')) |
| 76 | |
| 77 | def parseBlocks(self, parent, blocks): |
| 78 | """ Process blocks of markdown text and attach to given etree node. |
| 79 | |
| 80 | Given a list of ``blocks``, each blockprocessor is stepped through |
| 81 | until there are no blocks left. While an extension could potentially |
| 82 | call this method directly, it's generally expected to be used internally. |
| 83 | |
| 84 | This is a public method as an extension may need to add/alter additional |
| 85 | BlockProcessors which call this method to recursively parse a nested |
| 86 | block. |
| 87 | |
| 88 | """ |
| 89 | while blocks: |
| 90 | for processor in list(self.blockprocessors.values()): |
| 91 | if processor.test(parent, blocks[0]): |
| 92 | processor.run(parent, blocks) |
| 93 | break |
| 94 | |
| 95 |
no test coverage detected