Syntax highlighter

Le syntax  highlighter est un Extension utilisé par BogEngine.  Pour plus d'info sur l'auteur de cette extension aller sur le Blog de l'auteur.

Voici un exemple de ce que produit le syntax hilighter.


001 
002
003
004/// <summary>
005/// Small syntax highlighting extension for BlogEngine.net
006/// </summary>
007[ExtensionAttribute("Syntax highlighting for BlogEngine.net", "0.1", "Alexander Schuc")]
008public class SyntaxHighlightingExtension
009{
010    private IParser htmlParser;
011    private uint codeID = uint.MinValue;
012
013
014

Il peut traiter les langages suivant:

 

 Langages suportés

 Code

ASPX                   aspx aspnet aspx ascx asax ashx
 C  c
 COBOL                  cob
 ColdFusion             cfm coldfusion
 CPP                    cpp c++
 C#  csharp c# cs
 CSS                    css
 Eiffel                 e
 Fortran                for
 Haskell                hs
 Java                   java
 JavaScript             js javascript
 JScript                jscript
 Mercury                m
 MSIL  pe
 Pascal  pas
 Perl  pl
 PHP  php php3
 Python                 py
 Ruby  ruby
 SQL  sql
 VisualBasic  vb
 VisualBasicScript   
 vbs
  XML  xml html htm

 

Pour utiliser le Syntax highlighter dans vos posts il suffit d'ajouter le tag [ code].  Voici quelques exemple:

  • [ code=csharp] your code! [/code ]
  • [ code=csharp;ln=on;title] bla bla [/code] [ code=csharp;A optional title!] your code!  [/code ]
  • [ code=anyOtherSupportedLanguage] your code! [/code ]

Posted by: franky
Posted on: 3/20/2008 at 5:54 AM
Tags: ,
Categories: BlogEngine.NET
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Code Formatter Extension

Permet de formater du code.  Voici un exemple

1: [code:c#;ln=on]
2:

3:

4:  
5:         /// <summary/>
6:         protected CodeFormat()
7:         {
8:             //generate the keyword and preprocessor regexes from the keyword lists
9:             Regex r;
10:             r = new Regex(@"\w+|-\w+|#\w+|@@\w+|#(?:\\(?:s|w)(?:\*|\+)?\w+)+|@\\w\*+");
11:             st
12:

13:

14: [/code]
 

 

Il connait les langage suivant: 

  • C#
  • vb
  • js
  • html
  •  xml
  • tsql
  • msh

Voici un comment le declarer

 [c o d e:c#;ln=on]


Posted by: franky
Posted on: 3/14/2008 at 5:55 AM
Tags: , ,
Categories: .Net | BlogEngine.NET
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Wow the new Microsoft Expression Blend 2.5 March 2008 Preview is out...

Wow the new Microsoft Expression Blend 2.5 March 2008 Preview is out...
Let try it...

Posted by: franky
Posted on: 3/10/2008 at 12:25 AM
Tags: , ,
Categories: .Net
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed