Source code highlighting
I rewrote and changed (especially for Habra, and more precisely for the .NET blog) at my leisure a small module that highlights the source code of C #, VB.NET, HTML / XML / ASPX, JavaScript and SQL.
If you want to insert a piece of source code into a new post or comment on a post, use Source Code Highlighter to highlight your code.
There is support for line numbering and line wrapping inserts if you checked "Disable autoformatting" when writing a post.
Here is an example of the highlighted source code that this module issues :
Bugs, requests and wishes leave in the comments. :)
I hope that this module will be useful for many and not only for use on this blog.
Use for health!
PS The
link to the site will always hang in the description of the blog.
UPD # 1: Added the ability to highlight HTML / XML / ASPX code.
UPD # 2: Added the ability to quickly copy code to the clipboard.
UPD # 3: Fixed line numbering. Now you can copy the code to the clipboard without any problems.
If you want to insert a piece of source code into a new post or comment on a post, use Source Code Highlighter to highlight your code.
There is support for line numbering and line wrapping inserts if you checked "Disable autoformatting" when writing a post.
Here is an example of the highlighted source code that this module issues :
* This source code was highlighted with Source Code Highlighter .
- using System;
- using System.Data;
- using System.Configuration;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- ///
- /// Summary description for Test
- ///
- public class Test
- {
- private int m_TestVar1;
- private float m_TestVar2;
- private DateTime m_TestVar3;
- public Test ()
- {
- //
- // TODO: Add constructor logic here
- //
- }
- public int TestVar1
- {
- get {return m_TestVar1; }
- set {m_TestVar1 = value; }
- }
- public float TestVar2
- {
- get {return m_TestVar2; }
- set {m_TestVar2 = value; }
- }
- public DateTime TestVar3
- {
- get {return m_TestVar3; }
- set {m_TestVar3 = value; }
- }
- }
Bugs, requests and wishes leave in the comments. :)
I hope that this module will be useful for many and not only for use on this blog.
Use for health!
PS The
link to the site will always hang in the description of the blog.
UPD # 1: Added the ability to highlight HTML / XML / ASPX code.
UPD # 2: Added the ability to quickly copy code to the clipboard.
UPD # 3: Fixed line numbering. Now you can copy the code to the clipboard without any problems.