Skip to content
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

PEP 655: Highlight TypeScript code snippet correctly #2343

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

davidfstr
Copy link
Contributor

Did add syntax-highlighting syntax as requested by {@AA-Turner , @hugovk , @CAM-Gerlach }.

However when I try to regenerate the PEP and view it locally, the marked block doesn't actually appear with any syntax-highlighted colors. Seems strange to use a notation that has no effect on the generated output.

Am I missing something? Is there a setting needed to actually enable syntax highlighting?

@AA-Turner
Copy link
Member

How are you generating it locally? Does python build.py -f work for colours?

A

@AA-Turner
Copy link
Member

I just rendered this PR locally and it works for me:
image

The legacy system will not have highlighting, if that's what you were looking at initially.

A

@davidfstr
Copy link
Contributor Author

How are you generating it locally?

  1. In the peps repo: make -j4
  2. In the pythondotorg repo: PEP_REPO_PATH=/Users/me/Projects/peps ./manage.py generate_pep_pages
  3. In the pythondotorg repo: PEP_REPO_PATH=/Users/me/Projects/peps ./manage.py runserver 0.0.0.0:9999

Did try replacing first step with:

  1. In the peps repo: python3 build.py -f

But still do not have colors. Here is what I see:
Screen Shot 2022-02-19 at 2 18 43 PM

@AA-Turner
Copy link
Member

Ahh, we crossed comments, sorry.

Yes the old system will not have syntax higlighting -- the new PEP-0676 based one will, though -- so this is forwards-compatability in effect.

A

@davidfstr davidfstr marked this pull request as ready for review February 19, 2022 22:23
@AA-Turner
Copy link
Member

Did try replacing first step with:

  1. In the peps repo: python3 build.py -f

Having done this, there should be a folder build/ in the peps repo root -- the pep-0655.html file is the one I screenshotted above.

A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants