예제 #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)
예제 #2
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
예제 #3
0
def test_none():
    assert markdown(None) == ''
예제 #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)
예제 #5
0
def test_none():
    assert markdown(None) == ''
예제 #6
0
def test_gist():
    gist = 'https://gist.github.com/lepture/5167275'
    assert '</script>' in markdown(gist)
예제 #7
0
파일: handlers.py 프로젝트: jun0205/june
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))
예제 #8
0
파일: handlers.py 프로젝트: accexine/june
 def post(self):
     text = self.get_argument('text', '')
     self.write(markdown(text))