Unable to make Pygments work #261

Closed
opened 3 years ago by a-berg · 2 comments
a-berg commented 3 years ago (Migrated from github.com)

Hello. I installed pygments (system wide, i.e. not part of a conda or pipenv environment), then tried to run the small example:

#lang pollen
◊(require pollen/unstable/pygments)
◊highlight['python]{
for x in range(3):
    print x
}

The output in drracket is:
'(div ((class "highlight")) (pre (code "for x in range(3):\n print x")))
Why? I have been looking at pipe.py and pygments.rkt in this repo and I can't figure it out. At first I thought it was because it was installed into an environment, but after installing it system wide it didn't work either...

Hello. I installed pygments (system wide, i.e. not part of a conda or pipenv environment), then tried to run the small example: ``` #lang pollen ◊(require pollen/unstable/pygments) ◊highlight['python]{ for x in range(3): print x } ``` The output in drracket is: ```'(div ((class "highlight")) (pre (code "for x in range(3):\n print x")))``` Why? I have been looking at `pipe.py` and `pygments.rkt` in this repo and I can't figure it out. At first I thought it was because it was installed into an environment, but after installing it system wide it didn't work either...
a-berg commented 3 years ago (Migrated from github.com)

As a side note, couldn't just you call to pygmentize as an external process and fetch that html into the end result? I don't think it would be much slower while it would make environment management much simpler (for example I could install with pipx). I think this is what pdfLaTeX does.

As a side note, couldn't just you call to `pygmentize` as an external process and fetch that html into the end result? I don't think it would be much slower while it would make environment management much simpler (for example I could install with `pipx`). I think this is what pdfLaTeX does.
a-berg commented 3 years ago (Migrated from github.com)

Nevermind, found #230. Apparently I forgot I have an alias from python3 to python.

Nevermind, found #230. Apparently I forgot I have an alias from `python3` to `python`.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen#261
Loading…
There is no content yet.