Questions tagged [prettify]

A JavaScript module and CSS file that allows syntax highlighting of source code snippets in an HTML page.

145 questions
61
votes
5 answers

Is there a Content Delivery Network (CDN) that hosts Google Code Prettify?

Is there a content delivery network (CDN) that is hosting google-code-prettify? I am putting together a blog on TypePad and would like to take advantage of a CDN if possible.
ahsteele
  • 26,243
  • 28
  • 134
  • 248
57
votes
2 answers

Can prettify.js be extended to support Mathematica?

The mathematica.SE is currently in private beta and will open to the public in a few days. Stack Overflow and related sites use prettify.js, however Mathematica is not a supported language. It would be pretty awesome to have a custom highlighting…
anon
57
votes
11 answers

How can I use Prettify with Blogger/BlogSpot?

I'm using blogger.com to host some texts on programming, and I'd like to use Prettify (same as Stack Overflow) to nicely colour the code samples. How do I install the Prettify scripts into the blog domain? Would it be better (if indeed it's…
billpg
  • 3,195
  • 3
  • 30
  • 57
54
votes
4 answers

Sublime Text 2 Code Formatting

First let me say I come from a Microsoft background and Visual Studio is my bread and butter. It has a command (keybind is arbitrary) that auto-formats any code syntax. The same command works in HTML, CSS, Javascript, C#, etc. I have tried…
Terry
  • 14,099
  • 9
  • 56
  • 84
42
votes
3 answers

How to add line numbers to all lines in Google Prettify?

I am using prettify:
  some code
It works but the line number show every 5 lines and not for every line. I am using these files
aurel
  • 3,082
  • 10
  • 44
  • 56
35
votes
7 answers

Generate pretty diff html in Python

I have two chunks of text that I would like to compare and see which words/lines have been added/removed/modified in Python (similar to a Wiki's Diff Output). I have tried difflib.HtmlDiff but it's output is less than pretty. Is there a way in…
The Unknown
  • 19,224
  • 29
  • 77
  • 93
29
votes
3 answers

How to get Google Prettify to render more like Visual Studio

I'm using Googles excellent Code Prettify and I'm quite happy with it. But: Does anybody happen to have a alternate CSS stylesheet so it'll render a bit more like Visual Studios default coloring? Green comments, red text/strings, etc.
Jakob Gade
  • 12,319
  • 15
  • 70
  • 118
21
votes
4 answers

Is there a pretty printer for python data?

Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps…
Ferruccio
  • 98,941
  • 38
  • 226
  • 299
19
votes
2 answers

aligning or prettifying code in emacs

I remember this was possible in emacs, but don't know how. If I have something like: 'abc' => 1, 'abcabc' =>2, 'abcabcabc' => 3, How can I align the keys, arrows and values to something like this? 'abc' => 1, 'abcabc' => 2, …
719016
  • 9,922
  • 20
  • 85
  • 158
16
votes
3 answers

Syntax highlighting on twitter bootstrap

I am trying to highlight some syntax using Google prettify but so far, its not working.
Gandalf
  • 1
  • 29
  • 94
  • 165
14
votes
4 answers

highlightjs with html code

How do I put my HTML code so that highlight.js prettify it ? I tried
    
        
        
 haha 
I did put at…
Kalzem
  • 7,320
  • 6
  • 54
  • 79
13
votes
5 answers

How to configure atom-beautify package to format with babel/jsx javascript files?

I searched for a package to auto-indent and beautify my React/babel code. I just tried atom-beautify which seems to have good feeback on Atom. But the result on an usual babel file is not good enough: "HTML tag" doesn't indent as wanted. Has anyone…
Damien Leroux
  • 11,177
  • 7
  • 43
  • 57
11
votes
3 answers

Is there a lang-vb or lang-basic option for prettify.js from Google?

Visual Basic code does not render correctly with prettify.js from Google. on Stack Overflow: Partial Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles…
Zack Peterson
  • 56,055
  • 78
  • 209
  • 280
10
votes
1 answer

Stack Overflow formatting for Wordpress

I've become so accustomed to stack overflow style formatting that I find it a hassle to format things manually in HTML anymore - specifically for blog posts. Is there anything enabling stack overflow style formatting for word press? Something akin…
Jamie Wong
  • 18,104
  • 8
  • 63
  • 81
10
votes
1 answer

emacs align-regexp with spaces instead of tabs

I use M-x align-regexp in emacs to prettify my Perl code, but by default it is using tabs instead of spaces, which is something one should not do according to Perl critic. Is there a way to change the behaviour of align-regexp so that it fills in…
719016
  • 9,922
  • 20
  • 85
  • 158
1
2 3
9 10