Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2009-11-06 04:14:13 and 2009-11-07 14:08:24

451
452
453
454
455
456
457
458

459
460

461
462
463
464
465
466
467
451
452
453
454
455
456
457

458
459

460
461
462
463
464
465
466
467







-
+

-
+







</pre>
</nowiki>
<h2><a name="source-hilight">Source highlighting</a></h2>
<h3>Motivation</h3>
  *  You want to have source code highlighting for the files in your repository

<h3>Problem</h3>
The main purpose of Fossil is to do versioning the source code. Although it provides a standalone server and lets you navigate through the repository files additional features like source code highlighting from my perspective (I am not a developer of Fossil) is out of scope for an SCM. Just keep the Unix principle: small little programs that do their task and do it well.
The main purpose of Fossil is to do versioning for source code. Although it provides a standalone server and lets you navigate through the repository files additional features like source code highlighting from my perspective (I am not a developer of Fossil) are out of scope for an SCM. Just keep the Unix principle: small little programs that do their task and do it well.

However to have a source code highlighting in the presented web pages would still be desirable.
However to have source code highlighted in the presented web pages would still be desirable.

<h3>Solution</h3>
There are two scenarios how to implement such a feature:
   *  Fossil pipes the source code through a filter before sending it to the browser. The filter could be defined as a configuration option to Fossil. One solution for this might be the <a href="http://www.gnu.org/software/src-highlite">GNU Source code Highlighting</a> program.
   *  Use a Javascript library that renders the code within your browser. One solution for this might be <a href="http://code.google.com/p/syntaxhighlighter">Google Syntax Highlighter</a>

I estimate that the <i>pipe</i> solution needs some more work/ code changes. Thus I am solely looking at the Javascript solution.