Example #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)
Example #2
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
Example #3
0
def test_none():
    assert markdown(None) == ''
Example #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)
Example #5
0
def test_none():
    assert markdown(None) == ''
Example #6
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
Example #7
0
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))
Example #8
0
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))