Questions tagged [pygments]

A generic source code syntax highlighter written in Python.

Pygments is a generic source code syntax highlighter, written in , with support for a wide range of common languages and markup formats. Pygments is the standard syntax highlighter used by the Jekyll blogging platform.

264 questions
0
votes
1 answer

Running Installed Binaries from PHP Script (as apache)

I'm trying to write a PHP script to run a fairly simple shell command. The command is Pygmentize, which is a binary I have installed and is located in /usr/local/bin/pygmentize-1.4. This works fine while in the command line of my web server…
pdt2383
  • 63
  • 1
  • 2
  • 6
0
votes
1 answer

How to import Python Markdown and pygments when developing Sublime Text plugins?

I copied markdown and pygments folder to my plugin's path, and did this: try: import sys sys.path.append("./markdown") sys.path.append("./pygments") import markdown except ImportError: self.view.insert(edit, 0, "The markdown…
dyzdyz010
  • 2,256
  • 3
  • 16
  • 17
0
votes
1 answer

Pygments codeblock formatter adds weird spaces to markdown codeblocks

As in the below picture: To explicitly point out what I'm talking about, I mean the spaces before every ., +, ], |, and =. As well as probably other punctuation that comes up elsewhere. I'm using pygments.rb and the Redcarpet gem to format…
Sasha
  • 6,224
  • 10
  • 55
  • 102
0
votes
2 answers

PHP exec() with Pygments for PHP

I'm currently using the Pygments for PHP plugin that is located here: http://derek.simkowiak.net/pygments-for-php/. The line that actually calls Pygments from that code is an exec() passed: pygmentize -f html $extra_opts -l $language $temp_name as…
Scott Douglass
  • 170
  • 2
  • 10
0
votes
1 answer

Pygments piped to less inside python script breaks highlighting

from pygments.lexers import RstLexer from pygments.formatters import TerminalFormatter from pygments import highlight output = highlight(source, RstLexer(), TerminalFormatter()) p = subprocess.Popen('less',…
mktums
  • 426
  • 1
  • 4
  • 15
0
votes
1 answer

Use a Pygments lexer with no mime type in Trac?

I'd like to have Trac colorize my aspx files but I can't find a way to make it work. I can easily add a mime-type/extension mapping for most Pygments lexers, but the CSharpAspxLexer doesn't have an assigned mime type (see…
mlerley
  • 70
  • 1
  • 2
  • 10
0
votes
1 answer

Python markdown not respecting indentation

I'm having a problem here: i'm building out a simple blog, and I'm using markdown, pygments and django to do so. My content is in markdown and I wish to code-highlight it. It works fine, except markdown, is not respecting the indentation of python…
George Silva
  • 3,454
  • 10
  • 39
  • 64
0
votes
2 answers

Pygments lexer for AspectJ

I just asked the support guys on GitHub why AspectJ (*.aj) files are not syntax-highlighted. The answer was that they are using Pygments, but are unaware of any existing lexer for AspectJ. I did a quick web search and did not find any either. Has…
kriegaex
  • 63,017
  • 15
  • 111
  • 202
0
votes
1 answer

Pygmentize: No formatter found for name 'javascript'

I'm trying to use Pygments to generate a CSS file formatted for JavaScript. I can do it fine for HTML by using: pygmentize -S default -f html However, when I try for JavaScript: pygmentize -S default -f javascript I get the following error: No…
Travis
  • 12,001
  • 8
  • 39
  • 52
1 2 3
17
18