miyakogi / m2r

Markdown to reStructuredText converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[PyPi] md2rst parsing problem

maxkrivich opened this issue · comments

commented

I'm using m2r for parse my README.md file and after publication on pypi formatting just broke.

my parser code in setup.py

try:
    from m2r import parse_from_file

    LONG_DESCRIPTION = parse_from_file('README.md')
except ImportError:
    with open('README.md') as f:
        LONG_DESCRIPTION = f.read()

Thank you for reporting.

But sorry, I couldn't find where is broken.
Could you let me know where is different from what you expected?

This is a screenshot of the pypi page.

image

commented

@miyakogi I fix, but a problem was in wrong License title after parsing.

Thank you, I understand the problem.

In reStructuredText, headings must appear its order in the document.
If you use ### before ##, rst converts ### to <h2> tag and ## to <h3> tag in HTML.

It is defined in the spec of rst, so m2r cannot fix it, sorry.
http://docutils.sourceforge.net/docs/user/rst/quickstart.html#sections

commented

@miyakogi ok, thanks!