The highlighting of source code (new version)

Today released a new version of my module, which highlights source code C# VB.NET, HTML/XML/ASPX, JavaScript and SQL.

If You want to insert a piece of source code in a new entry or a comment for the post on habré, Source Code Highlighter to highlight Your code.

There is support for line numbering and insertion of the wrap, if you check "Disable automatic line breaks and referencing" when writing a post.

new features:

    the
  • fixed line numbering of code. You can now highlight source code without numbering.
  • the
  • Added button to quickly copy the formatted code to the clipboard — "Copy formated code to clipboard".
  • the
  • Added the ability to preserve the original indenting (at the request dunkan_macleod) — "Preserve the Original Padding".
  • UPD: Added support for normal quotes. ("")


Here is an example of highlighted source code which produces this module:

    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;

    the

  1. /// <summary>
  2. /// Summary description for Test the

  3. /// </summary>
  4. public class Test

    {

    private int m_TestVar1;

    private float m_TestVar2;

    private DateTime m_TestVar3;

    public Test()

    { the

  5. //
  6. // TODO: Add constructor logic here the

  7. //
  8. the
  9. }
  10. public int TestVar1

    {

    get { return m_TestVar1; }

    set { m_TestVar1 = value; } the

  11. }
  12. public float TestVar2

    {

    get { return m_TestVar2; }

    set { m_TestVar2 = value; } the

  13. }
  14. public DateTime TestVar3

    {

    get { return m_TestVar3; }

    set { m_TestVar3 = value; } the

  15. }
  16. the

  17. }
* This source code was highlighted with Source Code Highlighter.

Use your health while on habré this is not possible.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

When the basin is small, or it's time to choose VPS server

Performance comparison of hierarchical models, Django and PostgreSQL

From Tomsk to Silicon Valley and Back