Код: Выделить всё
import markdown
md_text = """
```python
# some Python code
hi = 'Hello'
print(hi)
```
"""
html = markdown.markdown(md_text, extensions=['fenced_code', 'codehilite'])
print(html)
Итак, что я могу сделать, чтобы получить более красивый и красочный HTML-код из текста уценки? Всем спасибо!
Подробнее здесь: https://stackoverflow.com/questions/733 ... with-pytho