Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 460172 - dev-python/markdown - Bad markdown to HTML conversion when using <!-- HTML --> comments within the Markdown code.
Summary: dev-python/markdown - Bad markdown to HTML conversion when using <!-- HTML --...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All All
: Normal trivial
Assignee: Python Gentoo Team
URL: https://github.com/waylan/Python-Mark...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-03 19:52 UTC by pferor
Modified: 2013-08-25 11:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.