Mardown fails combining fenced_code and attr_list
<p>I'm trying to write markdown files for mkdocs and want an id attribute with the pre tag, generated be fenced_code. If i use both extensions in combination there is no pre-tag but a p(aragraph tag):</p>

<pre><code>import markdown

text = """# Welcome

This is *true* markdown text.

````python
a=5
print "Hello World"
````{: #hello }
"""

html = markdown.markdown(text, extensions= ['markdown.extensions.fenced_code', 'markdown.extensions.attr_list'])
print html
</code></pre>

<p>print returns</p>

<pre><code>&lt;h1&gt;Welcome&lt;/h1&gt;
&lt;p&gt;This is &lt;em&gt;true&lt;/em&gt; markdown text.&lt;/p&gt;
&lt;p&gt;&lt;code id="hello"&gt;python
a=5
print "Hello World"&lt;/code&gt;&lt;/p&gt;
</code></pre>

<p>but i expected </p>

<pre><code>&lt;pre id="hello"&gt;&lt;code&gt;...
</code></pre>

<p>it's the same under mkdocs, which i use actually. I need  with id to access it through javascript and run the embedded python code wit skulpt.
Is there a solution to achieve this?</p>

<p>I posted an issue to mkdocs on github and they say it is not possible at the moment. So i tried something else. Because i needed the id of the pre-element in a javascript-function which reacts to an onclick, i figured out, how to access the pre content from there. I was lucky to find that parentNode.previousElementSibling does what in want. The event's target is the element with the onclick event.</p>

<pre><code>elem = event.target.parentNode.previousElementSibling
</code></pre>

<p>hope, anyone in a comparable situation understands what i mean :-)</p>

javascript python html markdown mkdocs