A JavaScript module and CSS file that allows syntax highlighting of source code snippets in an HTML page.
Questions tagged [prettify]
145 questions
1
vote
0 answers
command line prettify BSON
been working with mongo recently, which means a ton of very large nested hashes in (basically) json format. Currently I am piping json through python -mjson.tool in emacs, which works great for json, but bson also includes ObjectId("key"), and…

Matt Briggs
- 41,224
- 16
- 95
- 126
1
vote
1 answer
prettify doesn't highlight asp.net tags
I use google-code-prettify as my syntax highlighter, but i have a problem with asp.net tags, prettify doesn't recognize it, so code like this:

tone
- 1,535
- 3
- 15
- 20
1
vote
1 answer
Prettify with BeautifulSoup using a formatter that will preserve   AND Cyrillic characters?
I'm generating some HTML with python and BeautifulSoup4. At the end, I'd like to prettify the generated HTML. If I prettify as follows:
soup.prettify()
BeautifulSoup converts all the   characters to spaces. Unfortunately, my webpage relies on…

bikz
- 415
- 4
- 11
1
vote
1 answer
How to find an element that prettify doesn't show
I am trying to get the origin of this product with Beautifulsoup. I am trying to select the div in which the product data is ordered but I can't.
Later I tried to obtain other div in the code, one of the firsts in the code, but had the same problem.…

Flor Pupi
- 39
- 4
1
vote
1 answer
How can I make prettify code work in one line?
I load prettify.js and format my code as such:
x = a;
y = b;
It comes out all proper and pretty, but... I need to squeeze this code into an SQL column so it needs to be in one line without any hidden line breaks. I tried
x = a;\ny = b;
That…

Arthur Tarasov
- 3,517
- 9
- 45
- 57
1
vote
1 answer
Given a .SQL file on an internal website, what options are there for pretty formatting on the fly?
So I want to put the files up on my local server, for reference purposes and aside from my regular DVCS because this will turn into training material later. But I want to be able to pretty format the SQL file. (Would be nice if it extended to C#…

jcolebrand
- 15,889
- 12
- 75
- 121
1
vote
0 answers
Android TextView SyntaxHighlighting
I know that the title is a duplicated question but I have no other choices as some threads here in StackOverflow are old. Anyway my question is, is there a code for android to highlight syntax? I've tried using Java Prettify and created a code a…

David Diaz
- 113
- 3
- 14
1
vote
1 answer
Sublime Text HTML-CSS-JS Prettify Removing Code
HTML-CSS-JS Prettify is by far the best formatting plugin I have found for Sublime Text, but I work on HTML Emails being sent with ExactTarget.
ExactTarget's Amp script for variable emails uses the format %%=v(@var)=%% and when I run the HTML…

JSturgessMeyers
- 85
- 1
- 2
- 11
1
vote
1 answer
Code highlighting problems with prettify in VoltRb
I've been having some problems getting the JavaScript prettify library to work on a project in VoltRb. The problem is that the code highlighting seems to work only when an error occurs and the page is reloaded. I think that the problem has something…

GDP2
- 1,948
- 2
- 22
- 38
1
vote
1 answer
Html code block for html snippet?
This has to be the most frustrating thing ever lol.
I am using prettify.js to give the code syntax color, but with prettify.js or prism.js when I encode the html I have to write it like below with a period before .<, otherwise my syntax is messed…

Michael Joseph Aubry
- 12,282
- 16
- 70
- 135
1
vote
1 answer
Google Code Prettify Conflict with HTML
I am trying to use google-code-prettify to highlight the syntax of some code, but the browser is rendering the HTML I am including in the tags. I have followed the Getting Started instructions
e.g.
…

propster
- 527
- 1
- 5
- 14
1
vote
0 answers
Django code pretifier for HTML
I'm new in Django, and I'd like to know if there is any JQuery library to prettify Django code.
I have a web site in PHP and I'd like to show some Django code prettified, there is only 2 possible syntax in Django template {{ }} or {% %} I was…
user3512925
1
vote
0 answers
How to preserve overall indentation level of selection with Sublime HTML/CSS/JS Prettify
I have indentation set to char=tab, and levels=1 for Prettify for Sublime. Works great on a whole document. However, if I use it on a selection, which naturally already has a certain level of indentation, it left justifies the entire block while…

dbonneville
- 2,079
- 4
- 19
- 26
1
vote
1 answer
Highlighting and formatting code snippets using JavaScript
I'm looking for a way to highlight and format code snippets passed as string for a live style guide. I'm playing around with highlighjs and prettify. They are really helpful and easy for highlighting, but I can't seem to figure out a way to format…

the franc
- 133
- 1
- 7
1
vote
2 answers
How to use Prettify with Pelican?
I would like to use prettify instead of Pelican's default code highligher on a Pelican site. I disabled the default code highlighting by specifying the MD_EXTENSIONS setting manually in pelicanconf.py and not including the codehilite extension. …

Szabolcs
- 24,728
- 9
- 85
- 174