javascript fenced code block parsing error #113

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@microjo
microjo commented Jan 25, 2013

use extras = ['fenced-code-block']. when fenced code block is javascript, markdown2 parses some md5 strings..

for example:

```javascript
<script type="text/javascript" src="{{ static_url('shadowbox/shadowbox.js') }}">
</script>
<script type="text/javascript">
Shadowbox.init({ handleOversize: "drag" });
window.onload = function() {
    Shadowbox.setup(".entry-content img", { gallery: "{{post.title}}", counterType: "skip" });
};
</script>
```

is parsed to:

<div class="codehilite"><pre><code><span class="nx">md5</span><span class="o">-</span><span class="mi">26</span><span class="nx">a31e11f9061693a9bf87e6a0855ef5</span>

the right result should be:

<script type="text/javascript" src="{{ static_url('shadowbox/shadowbox.js') }}">
</script>
<script type="text/javascript">
Shadowbox.init({ handleOversize: "drag" });
window.onload = function() {
    Shadowbox.setup(".entry-content img", { gallery: "{{post.title}}", counterType: "skip" });
};
</script>
@microjo microjo Update lib/markdown2.py
to avoid javascript fenced code block parsing error, do fenced code blocks before hash html blocks
efc9d7d
@nicholasserra
Collaborator

Hello. My patch in PR #135 may have fixed this issue. If not, if you could please add some tests exercising the bug that would be awesome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment