Lines Matching refs:parent
32 def lastChild(self, parent): argument
34 if len(parent):
35 return parent[-1]
60 def test(self, parent, block): argument
80 def run(self, parent, blocks): argument
120 def test(self, parent, block): argument
123 (parent.tag in self.ITEM_TYPES or \
124 (len(parent) and parent[-1] and \
125 (parent[-1].tag in self.LIST_TYPES)
129 def run(self, parent, blocks): argument
131 level, sibling = self.get_level(parent, block)
135 if parent.tag in self.ITEM_TYPES:
137 self.parser.parseBlocks(parent, [block])
153 def create_item(self, parent, block): argument
155 li = markdown.etree.SubElement(parent, 'li')
158 def get_level(self, parent, block): argument
174 child = self.lastChild(parent)
178 parent = child
183 return level, parent
189 def test(self, parent, block): argument
192 def run(self, parent, blocks): argument
193 sibling = self.lastChild(parent)
206 pre = markdown.etree.SubElement(parent, 'pre')
221 def test(self, parent, block): argument
224 def run(self, parent, blocks): argument
230 self.parser.parseBlocks(parent, [before])
234 sibling = self.lastChild(parent)
240 quote = markdown.etree.SubElement(parent, 'blockquote')
265 def test(self, parent, block): argument
268 def run(self, parent, blocks): argument
271 sibling = self.lastChild(parent)
288 lst = markdown.etree.SubElement(parent, self.TAG)
336 def test(self, parent, block): argument
339 def run(self, parent, blocks): argument
349 self.parser.parseBlocks(parent, [before])
351 h = markdown.etree.SubElement(parent, 'h%d' % len(m.group('level')))
367 def test(self, parent, block): argument
370 def run(self, parent, blocks): argument
377 h = markdown.etree.SubElement(parent, 'h%d' % level)
393 def test(self, parent, block): argument
396 def run(self, parent, blocks): argument
408 self.parser.parseBlocks(parent, ['\n'.join(prelines)])
410 hr = markdown.etree.SubElement(parent, 'hr')
425 def test(self, parent, block): argument
428 def run(self, parent, blocks): argument
434 sibling = self.lastChild(parent)
444 def test(self, parent, block): argument
447 def run(self, parent, blocks): argument
453 if parent.text:
454 parent.text = '%s\n%s' % (parent.text, block)
456 parent.text = block.lstrip()
459 p = markdown.etree.SubElement(parent, 'p')