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
Web Scraping with Beautiful Soup in Python - JavaScript Table
Im trying to scrape a table from a website but I cant seem to figure it out with Beautifulsoup in Python. Im not sure if its because of the table format, but I basically want to turn this table into a CSV.
from bs4 import BeautifulSoup
import…

Frank Drin
- 1,613
- 2
- 13
- 18
0
votes
3 answers
Python prettify create xml version
when I launch this code he generated xml file which contain xml version <\?xml version="1.0" ?>, I tried exclude this line using xml_declaration=False, but error appears:
TypeError: prettify() got an unexpected keyword argument 'encoding'
How I…

Oleg
- 11
- 1
0
votes
0 answers
Using google prettify in bootstrap website with php pages
I have a bootstrap website with css built in and am trying to implement google prettify as described on this tutorial: http://www.techinfected.net/2016/12/syntax-highlighting-with-code-prettify.html
The problem is, that my website employs php main…

Compoot
- 2,227
- 6
- 31
- 63
0
votes
1 answer
How can I run Prettify in a WPF WebBrowser to apply syntax highlighting?
I'm creating a WPF application that allows the user to enter text in a TextBox. This text may contain Markdown syntax, which is evaluated by a MarkdownDeep object to convert the text to HTML. I take this output and feed it to a WebBrowser control…

Mage Xy
- 1,803
- 30
- 36
0
votes
0 answers
Display a string as prettified HTML source code
I am working on an ASP.NET MVC web application.
On one page, I have a string that looks as follows:
This is some text !
For preview mode, I use Html.Raw(Model.MyText), and the text is displayed as rendered…
Tot Zam
- 8,406
- 10
- 51
- 76
0
votes
1 answer
Android syntax highlighting using Java prettify, not showing (less than) < or <= sign in textview?
I am using java Prettify for syntax highlighting of java code in android app. I followed this example
Android Syntax Highlighting?
public class PrettifyHighlighter {
private static final Map COLORS = buildColorsMap();
…

Jitin Jassal
- 137
- 2
- 13
0
votes
6 answers
PHP: finding, replacing, shortening, and prettifying user links with tags, ellipses, and link icons
When a user enters a URL, e.g. http://www.google.com, I would like to be able to parse that text using PHP, find any links, and replace them with tags that include the original URL as an HREF.
In other words, http://www.google.com will become

Josh Smith
- 14,674
- 18
- 72
- 118
0
votes
1 answer
prettify adding extra lines in xml
I'm using Prettify to make my XML file readable. I am adding some new info in to an excising XML file but when i save it to a file i get extra lines in between the lines. is there a way of removing these line? Below is the code i'm using
import…

LeeEng
- 3
- 3
0
votes
1 answer
How to display properly formatted JS code snippets on a web page?
I am storing a JavaScript function in DB without spaces. Later I am retrieving from DB and showing on a Web page using google prettify but the code-snippet shows in a single line,
var Pizza = function(size, toppingCodes) {
this.size = size;
…

user2225263
- 277
- 4
- 15
0
votes
1 answer
0
votes
1 answer
nginx, express, angular URL redirect loop
Not sure how to describe this problem.
localhost:8000/home on my app works fine. However when I deploy to my digitalocean server and go to www.domain.com/home it looks like the url flickers and redirecting itself between www.domain.com/home and…

Garuuk
- 2,153
- 6
- 30
- 59
0
votes
1 answer
Python bs4 'bytes' object has no attribute 'prettify'
I've recently tried to pull data from a website but it seems that I get an error which I can't solve on my own. So I started looking around to see if any other people had my exact same error and I found 3 to be precise, I tried all 3 solutions and a…

Naomi
- 271
- 1
- 3
- 15
0
votes
1 answer
Avoid CSS prettify creates new line for each tag on sublime 3
I'm using HTML - CSS - JS Prettify Plugin and sometimes when I write CSS styles I like to put them next to the other, like this
h1, h2, h3, h4, h5, h6, .uk-h1, .uk-h3, .uk-h4, .uk-h5, .uk-h6
but when I prettify the file it puts each tag below the…

miguelopezv
- 790
- 2
- 8
- 28
0
votes
0 answers
Calling google-prettify in Angularjs
I am trying to apply Google Prettify to my AngularJS code but it is working after the ng-route. I also have added a directive for prettify but still facing the problem:
app.directive('prettyprint', function() {
return {
restrict: 'C',
link:…

Ramana Uday
- 355
- 2
- 6
- 21