pycco-docs / pycco

Literate-style documentation generator.

Home Page:https://pycco-docs.github.io/pycco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTML <> are getting _incorrectly_ escaped

kespindler opened this issue · comments

Steps

  1. Install pycco using pip install pycco
    (Dependencies such as pygments, pystache, etc are installed)
  2. cd /usr/local/lib/python2.6/dist-packages/pycco (As one example).
  3. Run pycco main.py (That is to say, run pycco against the pycco source)

Expected results

Page identical to http://fitzgen.github.com/pycco/ appears.

Actual results

I believe this page is getting generated correctly, EXCEPT that all
the <> in the HTML are being escaped (presumably by pystache) into
< and >, so the page is more-or-less the raw HTML instead of the
rendered HTML. The pypi package of pystache was updated 3-25-12, so
I'm guessing this is what has caused pycco to fail. I haven't looked
into whether this is a bug on the pystache side as opposed to the
pycco side.

Notes

My guess is that pycco is just not using the un-escaping versions of mustache tags
{{&..}} and {{{..}}}, but what do I know? My extremely quick attempt at resolving the issue
didn't fix it.

What version of pystache, pygments, and pycco are you using (or what commit are you on if you're using install from a repo)?

I tried it on two machines. Granted very similar setups.

Mac OS X using python 2.7, pystache 0.4.1, and pycco 0.3.0, pygments1.5
Ubuntu Linux, python 2.6, pystache 0.4.1, pycco 0.3.0, pygments1.5

I cannot reproduce your issue on Ubuntu Linux with 2.6.5, pystache 0.4.1 (from PyPI), pygments 1.5 (from PyPI), and pycco 0.3.0 (commit 09f4dbf which is the same as on PyPI).

I'm also using markdown 2.1.1 and smartypants 1.6.0.3.

Can you paste the generated HTML into a gist?

Hmmmm... I tried a checkout of both pystache (a4d763d54d83d4cbc9c254c897165563b119f7e8) and pycco (c0a6a23) from their respective bleeding edges. Not sure what the root cause was, but so long as I can't repro the problem anymore...