Questions tagged [prettify]

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

145 questions
10
votes
4 answers

BeautifulSoup Prettify fails on copyright symbol

I am getting a Unicode error: UnicodeEncodeError: 'charmap' codec can't encode character u'\xa9' in position 822: character maps to This appears to be a standard copyright symbol, and in the HTML is ©. I have not been able to find a…
user1521411
  • 101
  • 1
  • 3
9
votes
5 answers

format xml, pretty print

I know of two ways to "pretty print", or format, xml: shell tools Hack 38 Pretty-Print XML Using a Generic Identity Stylesheet and Xalan what other free (as in beer) formatters are there? (aside from using javascript)
Thufir
  • 8,216
  • 28
  • 125
  • 273
9
votes
3 answers

How to combine WMD and prettify, like Stack Overflow?

Prettify needs class="prettyprint" to be add to
 or . How to let WMD do this? 
Mask
  • 33,129
  • 48
  • 101
  • 125
9
votes
3 answers

Google Prettify with Bootstrap: Line Numbers Not Showing

I am using Google Prettify with Twitter Bootstrap. It is working, but for some reason, the line numbers are not appearing. Here is the markup:
    
  1. Matt
    • 6,787
    • 11
    • 65
    • 112
8
votes
1 answer

BeautifulSoup Prettify custom new line option

I'm using BeautifulSoup to build xml files. It seems like my two are options are 1) no formatting i.e. val1val2val3 or 2) with prettify i.e.
teebagz
  • 656
  • 1
  • 4
  • 26
8
votes
5 answers

Display javascript as code snippet

What I'm trying to do is display a snippet of javascript on the page, and not have it run, just display as a code snippet for folks to copy. I load google's Prettify, then in the page I have this code: