Esempio n. 1
0
def test_block_code():
    s = '\n'.join([
        'hello world',
        '',
        '```py',
        'def hello()',
        '    pass',
        '```',
        ''
    ])
    assert 'py' in markdown(s, False)
    assert 'highlight' in markdown(s)
Esempio n. 2
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
Esempio n. 3
0
def test_none():
    assert markdown(None) == ''
Esempio n. 4
0
def test_block_code():
    s = '\n'.join(
        ['hello world', '', '```py', 'def hello()', '    pass', '```', ''])
    assert 'py' in markdown(s, False)
    assert 'highlight' in markdown(s)
Esempio n. 5
0
def test_none():
    assert markdown(None) == ''
Esempio n. 6
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
Esempio n. 7
0
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))
Esempio n. 8
0
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))