Esempio n. 1
0
 def test_escaping_markup_token_inside_literal_block(self):
     check(self,
           [sut.LiteralLayout(lines_content(['```']))],
           sut.parse(['```',
                      '\\```',
                      '```',
                      ]))
Esempio n. 2
0
 def test_single_literal_block_w_class(self):
     check(self,
           [sut.LiteralLayout(lines_content(['literal line']), 'the-class')],
           sut.parse(['```:the-class',
                      'literal line',
                      '```',
                      ]))
Esempio n. 3
0
 def test_literal_block_with_blank_lines_should_not_split_block(self):
     check(self,
           [sut.LiteralLayout(lines_content(['first line'] +
                                            sut.PARAGRAPH_SEPARATOR_LINES +
                                            ['last line']))],
           sut.parse(['```',
                      'first line'] +
                     sut.PARAGRAPH_SEPARATOR_LINES +
                     ['last line',
                      '```',
                      ]))
Esempio n. 4
0
 def test_literal_block_between_paragraph_blocks(self):
     check(self,
           [
               Paragraph([StringText('para 1')]),
               sut.LiteralLayout(lines_content(['literal line'])),
               Paragraph([StringText('para 2')]),
           ],
           sut.parse(['para 1'] +
                     sut.PARAGRAPH_SEPARATOR_LINES +
                     ['```',
                      'literal line',
                      '```'] +
                     sut.PARAGRAPH_SEPARATOR_LINES +
                     ['para 2']))