Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2010-10-05 07:09:17 and 2010-12-01 01:47:25

513
514
515
516
517
518
519













520
521
522
523
524
525
526
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539







+
+
+
+
+
+
+
+
+
+
+
+
+







<pre>
if( zMime==0 ){
    @ &lt;pre name="code" class="c"&gt;
    @ %h(blob_str(&content))
    @ &lt;/pre&gt;
</pre>
</p>
<p>
If you only expect one language to be highlighted on a page, then you can implement the above without changing the Fossil code. Just use JQuery in the header like this (this example is for Visual Basic):
<pre>
<script src="http://code.jquery.com/jquery-1.4.4.js"></script>
</pre>
and in the footer like this:
<pre>
<script>$("pre:last").addClass("brush: vb");</script>
<script>
$(document).ready(function() {SyntaxHighlighter.all()});     
</script>
</pre>
</p>
<h3>Discussion</h3>
The Javascript solution requires a minimum to be fully supported by Fossil. Of course my litte change only applies for C/C++ files. But only little more work needs to be done to get the extension of the file a guess the file type.

The pipe solution would also be nice but would probably need some more work than this little patch.

<h2><a name="win32dev">How to prepare your Windows XP Fossil development Environment</a></h2>
<h4>MinGW+NSIS/WiX</h4>