gfm
gfm copied to clipboard
Handle language information
gfm
does not parse the language information correctly for code blocks:
```python
print('Hello World')
```
becomes
<p><code>python\nprint('Hello World')</code></p>
Where it should be
<p><code class="python">\nprint('Hello World')</code></p>
I fixed with:
content = re.sub (r'<p><code>python', r'<pre><code class="python">', content)
content = re.sub (r'</code></p>', r'</code></pre>', content)
However, there is a more serious issue. It can't handle C code blocks - it gets really confused by things like #include<stdio.h>
- not found a fix for that yet.