{"action":"created","issue":{"url":"https://api.github.com/repos/Python-Markdown/markdown/issues/609","repository_url":"https://api.github.com/repos/Python-Markdown/markdown","labels_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/609/labels{/name}","comments_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/609/comments","events_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/609/events","html_url":"https://github.com/Python-Markdown/markdown/issues/609","id":281777156,"number":609,"title":"Code block in Django web renders bad","user":{"login":"polrodoreda","id":15829269,"avatar_url":"https://avatars1.githubusercontent.com/u/15829269?v=4","gravatar_id":"","url":"https://api.github.com/users/polrodoreda","html_url":"https://github.com/polrodoreda","followers_url":"https://api.github.com/users/polrodoreda/followers","following_url":"https://api.github.com/users/polrodoreda/following{/other_user}","gists_url":"https://api.github.com/users/polrodoreda/gists{/gist_id}","starred_url":"https://api.github.com/users/polrodoreda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polrodoreda/subscriptions","organizations_url":"https://api.github.com/users/polrodoreda/orgs","repos_url":"https://api.github.com/users/polrodoreda/repos","events_url":"https://api.github.com/users/polrodoreda/events{/privacy}","received_events_url":"https://api.github.com/users/polrodoreda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-13T14:53:53Z","updated_at":"2017-12-13T15:23:20Z","closed_at":null,"author_association":"NONE","body":"I implement markdown in a django blog. All renders good except code block that, instead of:\r\n```python\r\ndef hello():\r\n    print 'Hello'\r\n```\r\n is interpreted like:\r\n\r\n:::python \r\ndef hello(): \r\nprint 'Hello'\r\n\r\nWhat am I doing wrong? Or it is a bug?"},"comment":{"url":"https://api.github.com/repos/Python-Markdown/markdown/issues/comments/351423399","html_url":"https://github.com/Python-Markdown/markdown/issues/609#issuecomment-351423399","issue_url":"https://api.github.com/repos/Python-Markdown/markdown/issues/609","id":351423399,"user":{"login":"polrodoreda","id":15829269,"avatar_url":"https://avatars1.githubusercontent.com/u/15829269?v=4","gravatar_id":"","url":"https://api.github.com/users/polrodoreda","html_url":"https://github.com/polrodoreda","followers_url":"https://api.github.com/users/polrodoreda/followers","following_url":"https://api.github.com/users/polrodoreda/following{/other_user}","gists_url":"https://api.github.com/users/polrodoreda/gists{/gist_id}","starred_url":"https://api.github.com/users/polrodoreda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/polrodoreda/subscriptions","organizations_url":"https://api.github.com/users/polrodoreda/orgs","repos_url":"https://api.github.com/users/polrodoreda/repos","events_url":"https://api.github.com/users/polrodoreda/events{/privacy}","received_events_url":"https://api.github.com/users/polrodoreda/received_events","type":"User","site_admin":false},"created_at":"2017-12-13T15:23:20Z","updated_at":"2017-12-13T15:23:20Z","author_association":"NONE","body":"Okey, Let me explain.\r\nI installed markdown and pygments. Then I execute `pygmentize -S default -f html -a .codehilite > easydjango/static/css/custom.css` to create pygments css file.\r\n\r\nI crete a templatetag like this:\r\n\r\n```python\r\n@register.filter\r\ndef markdownify(text):\r\n    return markdown.markdown(text, safe_mode='escape', extension=['markdown.extensions.codehilite'])\r\n```\r\n\r\nAfter that I've experimented some issues.\r\n\r\nIf the source code looks like:\r\n\r\n```pyhton\r\ndef hello():\r\n    print 'Hello'\r\n```\r\n\r\nThe output is: ```pyhton def hello(): print 'Hello'```.\r\n\r\nIf the source code is:\r\n\r\n    :::python\r\n    def hello():\r\n        print 'Hello'\r\n\r\nThe output will be (without codehilite classes):\r\n\r\n:::python\r\ndef hello():\r\n    print 'Hello'"}}
{"actor":{"display_login":"polrodoreda"}}