Source code highlighting (new version)

    Today a new version of my module has been released , which 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 record or comment on a record on Habré, Source Code Highlighter will highlight your code.

    There is support for line numbering and line wrapping inserts if you checked "Disable automatic line breaks and link creation" when writing a post.

    In the new version:

    • Fixed line numbering. Now you can select the source code without numbering.
    • A button has been added for quickly copying a formatted code to the clipboard - “Copy formated code to clipboard”.
    • Added the ability to save the original indentation (at the request of dunkan_macleod) - "Preserve Original Padding".
    • UPD: Added support for normal quotes. ("")

    Here is an example of the highlighted source code that this module issues:
    1. using System;
    2. using System.Data;
    3. using System.Configuration;
    4. using System.Web;
    5. using System.Web.Security;
    6. using System.Web.UI;
    7. using System.Web.UI.WebControls;
    8. using System.Web.UI.WebControls.WebParts;
    9. using System.Web.UI.HtmlControls;
    10.  
    11. ///
    12. /// Summary description for Test
    13. ///
    14. public class Test
    15. {
    16.  
    17.     private int m_TestVar1;
    18.     private float m_TestVar2;
    19.     private DateTime m_TestVar3;
    20.  
    21.     public Test ()
    22.     {
    23.         //
    24.         // TODO: Add constructor logic here
    25.         //
    26.     }
    27.  
    28.     public int TestVar1
    29.     {
    30.         get {return m_TestVar1; }
    31.         set {m_TestVar1 = value; }
    32.     }
    33.  
    34.     public float TestVar2
    35.     {
    36.         get {return m_TestVar2; }
    37.         set {m_TestVar2 = value; }
    38.     }
    39.  
    40.     public DateTime TestVar3
    41.     {
    42.         get {return m_TestVar3; }
    43.         set {m_TestVar3 = value; }
    44.     }
    45.  
    46. }
    * This source code was highlighted with Source Code Highlighter .

    Use health while on Habré there is no such opportunity.

    Also popular now: