| 782 | // Walk through a block & children recursively, parsing string content |
| 783 | // into inline content where appropriate. |
| 784 | var processInlines = function(block) { |
| 785 | var node, event, t; |
| 786 | var walker = block.walker(); |
| 787 | this.inlineParser.refmap = this.refmap; |
| 788 | this.inlineParser.options = this.options; |
| 789 | while ((event = walker.next())) { |
| 790 | node = event.node; |
| 791 | t = node.type; |
| 792 | if (!event.entering && (t === 'paragraph' || t === 'heading')) { |
| 793 | this.inlineParser.parse(node); |
| 794 | } |
| 795 | } |
| 796 | }; |
| 797 | |
| 798 | var Document = function() { |
| 799 | var doc = new Node('document', [[1, 1], [0, 0]]); |