A JavaScript module and CSS file that allows syntax highlighting of source code snippets in an HTML page.
Questions tagged [prettify]
145 questions
0
votes
1 answer
How to select commands based on file syntax in Sublime Text
I spent way too much time working out exactly how to override a particular code formatting tool in favor of another one when editing JavaScript, but leaving the other one in place for formatting HTML and CSS.
I didn't find any complete instructions…

shanemgrey
- 2,280
- 1
- 26
- 33
0
votes
2 answers
does prettify not work with html?
I am trying to use prettify like this:
But no text is output on my page, do I have to manually…
Matt Welander
- 8,234
- 24
- 88
- 138
0
votes
1 answer
AppleScript prettify for Sublime Text
I am looking for a way to prettify my AppleScripts when working in Sublime Text.
When working in the Script Editor, compiling the script (Cmd + K) also takes care of setting the correct indentation for the script.
Does anyone know a way to do this…

smizzlov
- 568
- 6
- 16
0
votes
2 answers
Prettify Custom Theme Code does not fit
On certain browsers (Firefox, in this case), the size of a given font is different, which prompted me to download a copy of a theme (desert) from the Google Code page and tweak it myself since the theme had a different background color from my…

Andrew Fan
- 1,313
- 5
- 17
- 29
0
votes
1 answer
Bootstrap 3.0 cause collapse entire code like a sentence, google prittyfy
I am using Markdown, google prettify and bootstrap then result comes in single line like this
Create Proc log AS Begin Try Select 10 / 0 End Try Begin Catch EXEC LogErr End Catch
Just commented out the "~/Content/bootstrap.css" file in bundling of…

Ali Adravi
- 21,707
- 9
- 87
- 85
0
votes
1 answer
Is it possible to decode prettify?
Is there a (already implemented) solution that decodes already encoded syntax from googles code-prettify?
<?php
$foo

Lucas
- 3,376
- 6
- 31
- 46
0
votes
1 answer
Prettifying code instead code tags without modifying HTML
Is there a good JavaScript library to format and color highlight code with
tags which doesn't require me to modify the HTML in any way? I don't have control over the HTML, I can only add external JavaScript code. Of course, I could add…

at.
- 50,922
- 104
- 292
- 461
0
votes
0 answers
Prettify line numbers come out of div
The line numbers for prettify come out of the div:
I realize I can fix this with a margin but if there are a large number of lines they will still overflow. Is there anyway to non-statically keep these numbers inside the
? EDIT: I have already…

lDucks
- 17
- 5
0
votes
1 answer
Will prettify cause conflicts in my git merges?
I've been introduced to a PHP / HTML codebase that is not consistently indented. I would like to run a "pretty code" or "prettify" on the code, but I am concerned that this will cause conflicts on some merges.
Any advice for accomplishing this or…

Betsy Dupuis
- 513
- 1
- 6
- 21
0
votes
1 answer
Google Prettify Line numbers and Font
I have been playing with Prettify and I got it working quickly. However when I tried to change the font in the css file i can't seem to see any change in the browser. I am using Silver Stripe as a CMS. In the CSS file from the website I…

user18490
- 3,546
- 4
- 33
- 52
0
votes
1 answer
Wrap markdown code blocks with prettyprint classes in Python
In python there is a markdown extension which highlights code which is codehilite. This extension wraps the snippets in codehilite classes. How can I get a function like this but to only put class='prettyprint' on every snippet without processing…

Luis Liz
- 1,939
- 4
- 20
- 31
0
votes
1 answer
How do I use google's code prettify on a target element?
I'm currently using the google prettify script prettyPrint. It functions properly, except that it only has the one function call to do the whole page:
prettyPrint();
Ideally I'd like a jquery wrapper that…

Bradley
- 2,071
- 2
- 21
- 32
0
votes
1 answer
Javascript not working on android webview consistently. Sometimes it works,most of the time it doesn't
I'm trying to achieve syntax highlighting of a C program from a html page.
"index.html","prettify.css","prettify.js" are stored in the assets folder
This is the code of my webview :
package com.example.javascriptexample;
import…

Umang Mathur
- 833
- 1
- 10
- 32
0
votes
0 answers
Avoid parsing code in pre and code HTML tags in ASP.Net
I need to display some code and highlight its syntax using prettifier which requires the code to be wrapped inside pre and code tags. But ASP.net parses the code present within these tags and displays an error on compilation. How do I avoid the code…

thunderbird
- 2,715
- 5
- 27
- 51
0
votes
3 answers
How do you get rid of .html url extension?
I'm attempting to 'prettify' my urls by getting rid of the .html url extensions. Upon researching similar questions, it seems a .htaccess file is require to change this, but all I have available with the particular server I'm hosting with is a…

Kyle Clay Richards
- 13
- 5