Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 460172

Summary: dev-python/markdown - Bad markdown to HTML conversion when using <!-- HTML --> comments within the Markdown code.
Product: Gentoo Linux Reporter: pferor <pferor>
Component: [OLD] DevelopmentAssignee: Python Gentoo Team <python>
Status: RESOLVED UPSTREAM    
Severity: trivial CC: ercpe
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
URL: https://github.com/waylan/Python-Markdown/issues/76
Whiteboard:
Package list:
Runtime testing required: ---

Description pferor 2013-03-03 19:52:49 UTC
# Problem

Bad markdown to HTML conversion when using <!-- HTML --> comments within the Markdown code.


# Recreation

Usage of markdown in Python when adding HTML comments.


# Error message

  File "/usr/lib64/python3.2/site-packages/markdown/preprocessors.py", line 226, in run
    if self.markdown_in_raw and 'markdown' in dict(attrs.keys()):
ValueError: dictionary update sequence element #0 has length 5; 2 is required


# Solution

Line #150 in file: `/usr/lib/python3.2/site-packages/markdown/preprocessors.py`

    -    left_tag, left_index, attrs  = "--", 2, ()
    +    left_tag, left_index, attrs  = "--", 2, {}
Comment 1 Johann Schmitz (ercpe) (RETIRED) gentoo-dev 2013-08-25 11:34:03 UTC
The issue has been fixed by upstream in the 2.2 release; please use >=dev-python/markdown-2.2.1-r1.