I am attempting to add microdata to my generated HTML and have found the attr_list extension. It does almost everything I need.
Here is the example code I'm using:
>>> text = """This is a paragraph.
... {: itemscope itemtype="http://schema.org/Movie"}
... """
>>> markdown.markdown(text, extensions=['markdown.extensions.attr_list'])
u'<p itemscope="itemscope" itemtype="http://schema.org/Movie">This is a paragraph.</p>'
The one problem I'm having is the itemscope="itemscope". According to the examples provided by schema.org, it should just be:
<p itemscope itemtype="http://schema.org/Movie">This is a paragraph.</p>
The closest I've gotten is
text = """This is a paragraph.
... {: itemscope="" itemtype="http://schema.org/Movie"}
... """
Which generates output as
u'<p itemscope="" itemtype="http://schema.org/Movie">This is a paragraph.</p>'
Is there a way to keep this as a naked tag (just itemscope without the equals) using this extension?