Questions tagged [google-code-prettify]

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

Google Code Prettify is a JavaScript module and CSS file that allows syntax highlighting of source code snippets in an HTML page.

Features

  • Works on HTML pages
  • Works even if code contains embedded links, line numbers, etc.
  • Simple API: Include some JavaScript code and CSS, and add an onload handler.
  • Lightweight: Small download and does not block page from loading while running.
  • Customizable styles via CSS. See the themes gallery
  • Supports all C-like, Bash-like, and XML-like languages. No need to specify the language
  • Extensible language handlers for other languages. You can specify the language.
  • Widely used with good cross-browser support.
103 questions
0
votes
2 answers

Select all or highlight all Text in an Element

I've been searching high and low for something like this, but for some reason I'm having trouble making it work. I'm not sure what I'm missing or doing wrong. References found…
0
votes
2 answers

HTML code in pre and xmp tags renders

I'm trying to display some HTML code in
 and  tags, but instead of just showing the code, this HTML code actually renders. Also I'm using Google Prettify to highlight the syntax.
<pre class="prettyprint…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> 
                
                <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Jan 05 '14 at 10:46">asked Jan 05 '14 at 10:46</time>
    <a href="../../users/2581710/alen" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/2581710.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Alen" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/2581710/alen" class="s-user-card--link">Alen</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">897</li>
            <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li>
            <li class="s-award-bling s-award-bling__silver" title="15 silver badges">15</li>
            <li class="s-award-bling s-award-bling__bronze" title="33 bronze badges">33</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-20604296">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status ">
                <strong>2</strong> answers
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/20604296/can-i-use-google-code-prettify-for-commercial-use" class="question-hyperlink">Can I use google code prettify for commercial use?</a></h3>
        <div class="excerpt">Can I use google code prettify for commercial use. I see that Code license - Apache License 2.0. Do I need to have a copy of the Apache license?
</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Dec 16 '13 at 05:48">asked Dec 16 '13 at 05:48</time>
    <a href="../../users/3008628/user3008628" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/3008628.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="user3008628" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/3008628/user3008628" class="s-user-card--link">user3008628</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">23</li>
            
            
            <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-17791170">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status ">
                <strong>2</strong> answers
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/17791170/how-to-add-code-gadget-on-google-sites" class="question-hyperlink">How to add Code Gadget on Google Sites</a></h3>
        <div class="excerpt">I have a google Site and I'm wondering how I can display code in a code block on my site, some thing similar to how code is displayed on stackoverflow or stackexchange. I've looked out for a google gadgets but couldn't find one. Any idea if there is…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/google-sites" class="post-tag grid--cell" title="show questions tagged 'google-sites'" rel="tag">google-sites</a> 
                
                <a href="../../questions/tagged/google-gadget" class="post-tag grid--cell" title="show questions tagged 'google-gadget'" rel="tag">google-gadget</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Jul 22 '13 at 15:13">asked Jul 22 '13 at 15:13</time>
    <a href="../../users/2607347/user2607347" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/2607347.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="user2607347" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/2607347/user2607347" class="s-user-card--link">user2607347</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">29</li>
            
            
            <li class="s-award-bling s-award-bling__bronze" title="2 bronze badges">2</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-17219677">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/17219677/asp-net-syntax-highlight-code-from-file-with-google-prettify" class="question-hyperlink">Asp.net, Syntax highlight code from file with google prettify</a></h3>
        <div class="excerpt">In my page I will get the ID from link parameters, with that ID I will search the database for the file path, after reading the file and storing its contents I want to put its contents inside my <pre> tag... So I will have a literal in which the…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> 
                
                <a href="../../questions/tagged/asp.net" class="post-tag grid--cell" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
                <a href="../../questions/tagged/asp-literal" class="post-tag grid--cell" title="show questions tagged 'asp-literal'" rel="tag">asp-literal</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Jun 20 '13 at 17:08">asked Jun 20 '13 at 17:08</time>
    <a href="../../users/2169109/datalekz" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/2169109.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="datalekz" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/2169109/datalekz" class="s-user-card--link">datalekz</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">129</li>
            
            <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li>
            <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-16160408">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/16160408/display-html-tags-in-ckeditor" class="question-hyperlink">display html tags in ckeditor</a></h3>
        <div class="excerpt">I am opening the ckeditor with below content as default.
<textarea id="editor1" name="editor1" rows="30" cols="120"><p>We can use&nbsp;<strong>prettify&nbsp;</strong>to auto-format the Computer programming code at web page.</p>

<p><strong>How to…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> 
                
                <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> 
                
                <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> 
                
                <a href="../../questions/tagged/ckeditor" class="post-tag grid--cell" title="show questions tagged 'ckeditor'" rel="tag">ckeditor</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Apr 23 '13 at 03:28">asked Apr 23 '13 at 03:28</time>
    <a href="../../users/1552407/vips" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/1552407.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="vips" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/1552407/vips" class="s-user-card--link">vips</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">342</li>
            <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li>
            <li class="s-award-bling s-award-bling__silver" title="4 silver badge">4</li>
            <li class="s-award-bling s-award-bling__bronze" title="19 bronze badge">19</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-13472352">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status ">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/13472352/syntax-highlighting-with-prettify-and-twitter-bootstrap" class="question-hyperlink">Syntax highlighting with Prettify and Twitter Bootstrap</a></h3>
        <div class="excerpt">Im trying to get syntax highlight in my <pre></pre> tags, but im using Bootstrap.. Im using Prettify right now, but it dosent work.. If you have a fix please share!
Basic the code i have right now, just cleaned up.
<link href="css/bootstrap.min.css"…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/twitter-bootstrap" class="post-tag grid--cell" title="show questions tagged 'twitter-bootstrap'" rel="tag">twitter-bootstrap</a> 
                
                <a href="../../questions/tagged/syntax-highlighting" class="post-tag grid--cell" title="show questions tagged 'syntax-highlighting'" rel="tag">syntax-highlighting</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Nov 20 '12 at 11:37">asked Nov 20 '12 at 11:37</time>
    <a href="../../users/1719581/andreas-myrup-larsen" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/1719581.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Andreas Myrup Larsen" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/1719581/andreas-myrup-larsen" class="s-user-card--link">Andreas Myrup Larsen</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">1</li>
            
            
            <li class="s-award-bling s-award-bling__bronze" title="5 bronze badges">5</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-12528187">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status ">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/12528187/highlighted-code-in-a-post-are-affecting-my-website" class="question-hyperlink">Highlighted code in a post are affecting my website</a></h3>
        <div class="excerpt">i am using my WMD editor to as markup editor and google prettify to highlight syntax marked by WMD editor,i am using yii as a framework and whenever i include some html in my code,in stead of being highlighted they are being interpreted as part of…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/yii" class="post-tag grid--cell" title="show questions tagged 'yii'" rel="tag">yii</a> 
                
                <a href="../../questions/tagged/wmd" class="post-tag grid--cell" title="show questions tagged 'wmd'" rel="tag">wmd</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
                <a href="../../questions/tagged/wmd-markdown" class="post-tag grid--cell" title="show questions tagged 'wmd-markdown'" rel="tag">wmd-markdown</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Sep 21 '12 at 09:50">asked Sep 21 '12 at 09:50</time>
    <a href="../../users/1524289/eliethesaiyan" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/1524289.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Eliethesaiyan" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/1524289/eliethesaiyan" class="s-user-card--link">Eliethesaiyan</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">2,327</li>
            <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li>
            <li class="s-award-bling s-award-bling__silver" title="22 silver badge">22</li>
            <li class="s-award-bling s-award-bling__bronze" title="35 bronze badge">35</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-11376808">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/11376808/why-does-google-code-prettifier-stop-working-when-i-use-jquery-datepicker-or-v" class="question-hyperlink">Why does Google Code Prettifier stop working when I use JQuery DatePicker (or vice versa)</a></h3>
        <div class="excerpt">If the Google Code Prettifier (or JQuery Syntax Highlighter) is being used in the same page as the JQuery DatePicker, neither will work properly.  Why is this?
</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> 
                
                <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> 
                
                <a href="../../questions/tagged/jquery-ui-datepicker" class="post-tag grid--cell" title="show questions tagged 'jquery-ui-datepicker'" rel="tag">jquery-ui-datepicker</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Jul 07 '12 at 16:38">asked Jul 07 '12 at 16:38</time>
    <a href="../../users/3856/gaz" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/3856.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Gaz" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/3856/gaz" class="s-user-card--link">Gaz</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">4,064</li>
            <li class="s-award-bling s-award-bling__gold" title="3 gold badges">3</li>
            <li class="s-award-bling s-award-bling__silver" title="32 silver badges">32</li>
            <li class="s-award-bling s-award-bling__bronze" title="34 bronze badges">34</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-10883553">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>0</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/10883553/call-json-stringify-on-all-pre-elements" class="question-hyperlink">Call JSON.stringify on all pre elements</a></h3>
        <div class="excerpt">I'm trying to JSON.stringify all JSON text in <pre> elements in a document with a specified class, and then use google-code-prettify to add syntax colouring. Since I don't know Javascript or jQuery I'm struggling - so far all I have is the…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> 
                
                <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Jun 04 '12 at 15:05">asked Jun 04 '12 at 15:05</time>
    <a href="../../users/84538/jon-hanson" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/84538.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="jon hanson" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/84538/jon-hanson" class="s-user-card--link">jon hanson</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">8,722</li>
            <li class="s-award-bling s-award-bling__gold" title="2 gold badges">2</li>
            <li class="s-award-bling s-award-bling__silver" title="37 silver badges">37</li>
            <li class="s-award-bling s-award-bling__bronze" title="61 bronze badges">61</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-54738936">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>-1</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/54738936/drop-javascript-in-html-and-auto-format-all-code-and-or-pre-blocks" class="question-hyperlink">Drop javascript in html and auto-format all <code> and/or <pre> blocks</a></h3>
        <div class="excerpt">I am looking at this google prettify project:
https://github.com/google/code-prettify
In the usage section it says to use it like so:
<pre class="prettyprint">class Voila {
public:
  // Voila
  static const string VOILA = "Voila";

  // will not…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> 
                
                <a href="../../questions/tagged/css" class="post-tag grid--cell" title="show questions tagged 'css'" rel="tag">css</a> 
                
                <a href="../../questions/tagged/syntax-highlighting" class="post-tag grid--cell" title="show questions tagged 'syntax-highlighting'" rel="tag">syntax-highlighting</a> 
                
                <a href="../../questions/tagged/prettify" class="post-tag grid--cell" title="show questions tagged 'prettify'" rel="tag">prettify</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Feb 18 '19 at 00:15">asked Feb 18 '19 at 00:15</time>
    <a href="../../users/1223975/alexander-mills" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/1223975.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Alexander Mills" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/1223975/alexander-mills" class="s-user-card--link">Alexander Mills</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">90,741</li>
            <li class="s-award-bling s-award-bling__gold" title="139 gold badges">139</li>
            <li class="s-award-bling s-award-bling__silver" title="482 silver badges">482</li>
            <li class="s-award-bling s-award-bling__bronze" title="817 bronze badges">817</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-20096858">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>-3</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>2</strong> answers
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/20096858/jquery-find-comments-before-pre-tag" class="question-hyperlink">jQuery: find comments before pre tag</a></h3>
        <div class="excerpt">I try to implement like SO code highlight with pretty-print. How to get comment before pre tag?
<!-- language: some -->
<pre>
...

How to get comment before pre tag?
</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> 
                
                <a href="../../questions/tagged/jquery" class="post-tag grid--cell" title="show questions tagged 'jquery'" rel="tag">jquery</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Nov 20 '13 at 13:07">asked Nov 20 '13 at 13:07</time>
    <a href="../../users/2546662/medvedev" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/2546662.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Medvedev" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/2546662/medvedev" class="s-user-card--link">Medvedev</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">339</li>
            
            <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li>
            <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                
                    <div class="mln24">
                    <div class="question-summary" id="question-summary-49624875">
    <div class="statscontainer">
        <div class="stats">
            <div class="vote">
                <div class="votes">
                    <span class="vote-count-post"><strong>-4</strong></span>
                    <div class="viewcount">votes</div>
                </div>
            </div>

            <div class="status answered-accepted">
                <strong>1</strong> answer
            </div>
        </div>
    </div>
    <div class="summary">
        
        <h3><a href="../../questions/49624875/how-to-highlight-java-syntax-in-a-textview" class="question-hyperlink">How to highlight Java syntax in a textview?</a></h3>
        <div class="excerpt">I know this is an old question but answers available are either not working or depreciated for the newer versions of android. please provide a solution which will work in Android 5.0 and above.
@Override
protected void onCreate(Bundle…</div>
        <div class="grid ai-start jc-space-between fw-wrap">
            <div class="grid gs4 fw-wrap tags ">
                
                <a href="../../questions/tagged/java" class="post-tag grid--cell" title="show questions tagged 'java'" rel="tag">java</a> 
                
                <a href="../../questions/tagged/android" class="post-tag grid--cell" title="show questions tagged 'android'" rel="tag">android</a> 
                
                <a href="../../questions/tagged/textview" class="post-tag grid--cell" title="show questions tagged 'textview'" rel="tag">textview</a> 
                
                <a href="../../questions/tagged/syntaxhighlighter" class="post-tag grid--cell" title="show questions tagged 'syntaxhighlighter'" rel="tag">syntaxhighlighter</a> 
                
                <a href="../../questions/tagged/google-code-prettify" class="post-tag grid--cell" title="show questions tagged 'google-code-prettify'" rel="tag">google-code-prettify</a> 
                
            </div>
            <div class="started mt0">
                
                    
<div class="s-user-card s-user-card">
    <time class="s-user-card--time" datetime="asked Apr 03 '18 at 07:48">asked Apr 03 '18 at 07:48</time>
    <a href="../../users/8312513/prabhat-jha" class="s-avatar s-avatar__32 s-user-card--avatar">
        <img class="s-avatar--image" src="../../users/profiles/8312513.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Prabhat Jha" />
    </a>
    <div class="s-user-card--info">
        <a href="../../users/8312513/prabhat-jha" class="s-user-card--link">Prabhat Jha</a>
        <ul class="s-user-card--awards">
            <li class="s-user-card--rep" title="reputation score">7</li>
            
            
            <li class="s-award-bling s-award-bling__bronze" title="3 bronze badges">3</li>
        </ul>
    </div>
</div>

                
            </div>
        </div>
    </div>
</div>
                    </div>
                

                
<div class="s-pagination pager fr">
    
        <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=6" rel="prev" title="Go to page 6">Prev </a>
    
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=1" rel="" title="Go to page 1">1</a>
            
        
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=2" rel="" title="Go to page 2">2</a>
            
        
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=3" rel="" title="Go to page 3">3</a>
            
        
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=4" rel="" title="Go to page 4">4</a>
            
        
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=5" rel="" title="Go to page 5">5</a>
            
        
    
        
            
                <a class="s-pagination--item" href="../../questions/tagged/google-code-prettify_page=6" rel="" title="Go to page 6">6</a>
            
        
    
        
            <div class="s-pagination--item is-selected">7</div>
        
    
    
</div>

            </div>
        </div>

            </div>
        </div>
        <script src="../../static/js/stack-icons.js"></script>
        <script src="../../static/js/fromnow.js"></script>
        
    </body>
</html>