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
2 answers

How to change default markdown's inline highlight style?

I'm using pelican in Python to generate the static pages. It is fine to use markdown with Pygment to highlight a code block, however when it comes to the inline highlight, there is a significant difference. Please check my page. The page is in a…
tomriddle_1234
  • 3,145
  • 6
  • 41
  • 71
0
votes
1 answer

Pygmented code showing up as a list

I'm using django-pygments and am trying to us it like so (base.html) {% load pygmentify %}
chunpoon
  • 950
  • 10
  • 17
0
votes
1 answer

How to call markdown.markdown(unistring, extensions=['codehilit']) from Google App Engine?

I would like to call markdown.markdown function from Google App Engine. I have both markdown and pygments installed in modules folder. import modules.markdown as markdown import modules.pygments as pygments unistring = u'my…
LLaP
  • 2,528
  • 4
  • 22
  • 34
0
votes
2 answers

Pygments error: no lexer for alias - Underscores in code block

I'm working on a github-pages project with all the usual suspects. I'm trying to switch my markdown from kramdown to redcarpet to better support GFM for local development. I have an existing project that has just one troublesome section of…
0
votes
1 answer

How `jekyll` works with `pygments` locally on PC?

I'd like to create a project gh-pages, and i've installed jekyll and pygments locally. But while the website launched, the code snippets displayed without any color but a background. And even i pushed them into github, it also displayed without any…
Howard
  • 4,474
  • 6
  • 29
  • 42
0
votes
2 answers

Only Format Tags w/ pygments

I'm trying to use Pygments/Markdown to enable users to leave formatted code blocks in a project I'm working on using Flask. The problem I am having is that Pygments is formatting everything. I would like to call Markdown on the text so that the…
kylieCatt
  • 10,672
  • 5
  • 43
  • 51
0
votes
1 answer

python syntax hilighting using Pygment program

so, I have this test mardown document, and I used python to generate HTML doc like this: python -m markdown -x codehilite mydoc.md > mydoc.html Then, I generated the CSS file using Pygment as below: pygmentize -S default -f html >…
Vahid Mirjalili
  • 6,211
  • 15
  • 57
  • 80
0
votes
1 answer

Languages that are supported by Python markdown's codehilite extension

I searched the internet and couldn't find a list of languages that are supported by python markdown's codehilite extension via the command line? And is there an easy way to "extend" the codehilite extension to support other languages like…
user2489252
0
votes
1 answer

Django blog app that uses pygments and works like StackOverflow

I'd like to put together a Django Blog App that uses Pygments for code markup within the Blog. I'd like to be able to mark up the main text similar to StackOverflow with *, _ or cmd+K for special notation within the code to add href or bold etc. Is…
Aaron Lelevier
  • 19,850
  • 11
  • 76
  • 111
0
votes
1 answer

No syntax highlighting for python traceback - pygments

I'm using pygments version 1.6 on a blog to do some syntax highlighting (via the CodeHilite extension for markdown) The syntax highlighting for python is great. However, if I try to use the pytb lexer for highlighting a python traceback it's very…
Ben
  • 6,986
  • 6
  • 44
  • 71
0
votes
1 answer

How can i use the pygments make the markdown display line numbers?

I had known the liquid highlight display line numbers。 for example: {% highlight java linenos %} public class Test { } {% endhightlight $} But I don't known How should I let the markdown highlight display line numbers? ```java public…
xjliao
  • 23
  • 7
0
votes
1 answer

Pygments adding whitespace to HTML inside pre

I'm using Pygments to syntax some HTML created by the user. Here's what I have, notice the random padding to the left. The random space is also selectable I'm using Ruby to render the code block with = raw Pygments.highlight(block.content, lexer:…
cupcakekid
  • 233
  • 3
  • 13
0
votes
0 answers

Can't run Jekyll with pygments

I'm trying to run jekyll on my OS X, but get the error: Configuration file: /Users/antonshuvalov/Desktop/largescalejs/_config.yml Source: /Users/antonshuvalov/Desktop/largescalejs Destination:…
Anton Shuvalov
  • 3,560
  • 3
  • 16
  • 20
0
votes
1 answer

why the pygments highlight has a background color?

I am trying to build a blog using jekyll,and I want to highlight my code,after some search on the internt,I realize that I can use pygments.I install python-2.7.5,and install pygments. I install pygments with gem,the version pygments is 0.5.0. now…
liu peng
  • 95
  • 1
  • 2
  • 10
0
votes
2 answers

Pygments styling for HTML, PHP, and JavaScript

I am using Github's API to convert some Github Flavored Markdown into HTML. The HTML I get back has a bunch of classes that can be used for styling different code blocks (HTML, JavaScript, PHP, a bunch of languages). After doing some research, I…
Animal Rights
  • 9,107
  • 6
  • 28
  • 40
1 2 3
17
18