| 429 | return bool(self.RE.match(block)) |
| 430 | |
| 431 | def run(self, parent, blocks): |
| 432 | block = blocks.pop(0) |
| 433 | m = self.RE.match(block) |
| 434 | if m: |
| 435 | # Add remaining line to master blocks for later. |
| 436 | blocks.insert(0, block[m.end():]) |
| 437 | sibling = self.lastChild(parent) |
| 438 | if sibling and sibling.tag == 'pre' and sibling[0] and \ |
| 439 | sibling[0].tag == 'code': |
| 440 | # Last block is a codeblock. Append to preserve whitespace. |
| 441 | sibling[0].text = markdown.AtomicString('%s/n/n/n' % sibling[0].text ) |
| 442 | |
| 443 | |
| 444 | class ParagraphProcessor(BlockProcessor): |