-
Notifications
You must be signed in to change notification settings - Fork 618
PEP template incorrectly adds whitespace between code and following punctuation #825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Refactor these files to clean up rendering of peps. |
@berkerpeksag Now that we've updated the pep generation doc, I have tried to run the Going to 🌊. Will try to give another look after the weekend. |
Can you share the full traceback? I haven't had a chance to look into this yet. |
This is using the manual install. I haven't yet tried with vagrant.
|
Ah, yes, we don't support Python 3.5 right now. Prod is on 3.3 and Vagrant box is on 3.4. We need to upgrade to Django 1.8(and I'm not sure that they have a workaround for this in Django 1.8) before upgrading to Python 3.5, but there are some blockers like #591 and tastypie. I have a local WIP branch for Django 1.8 upgrade. |
Leaving this here as a reminder since I believe this is where it was fixed in Django django/django@b07aa52 I will give some thought on whether there's another alternative method for pep -> html that will be a quicker fix for the formatting and still keep the images up to date. We've done some conversions with the Jupyter notebooks to html. |
Hi @willingc, do you have some time to work on this or would you like me to take over? I'd be happy to review and merge a patch on this :) Thanks! |
Hi @berkerpeksag I would be happy for you to take over here. I'm just returning from a Japan vacation and have a bunch of work stuff to do over the next couple of weeks. Thanks! |
Hi @willingc and @berkerpeksag, |
Hi @Mariatta, thanks for your interest working on this. I think I already fixed this, but forgot send a PR. I'm away from my computer at the moment. I will check when I get home and let you know what's needed (we probably need a test case.) |
Ok, found my branch, rebased and pushed to master...berkerpeksag:825-pep-prettify. What's missing here is that the lack of test coverage of I remember I tested it manually and it worked fine, but it would be nice to have some more real test coverage :) You can see up-to-date information by running: $ coverage run manage.py test peps
$ coverage report -m If you'd like to work on this, we might need to design some sort of framework to easily test the converter code. Currently, we have a fake PEP repository located at https://github.com/python/pythondotorg/tree/master/peps/tests/fake_pep_repo. We might need to create PEP repos or PEPs dynamically to test every branch of the converter code. |
When a PEP uses backticks to render something as code and immediately follows it with punctuation (typically a comma or close paren) the template inserts a space -- apparently in the fixed-width font, which makes it even uglier. The legacy rendering doesn't have this problem.
Example: in https://www.python.org/dev/peps/pep-0495/ search for "is passed as tzinfo" finds two instances of this problem on one line. Compare to http://legacy.python.org/dev/peps/pep-0495/ where these two are rendered correctly.
The text was updated successfully, but these errors were encountered: