Git Product home page Git Product logo

sunlight's Introduction

Sunlight

Sunlight is a context-aware, client-side syntax highlighter. It does as a good of a job as can be done highlighting code without performing static analysis. Check out the sexy demo!.

Highlighted C# code

Licensed under WTFPL: http://sam.zoy.org/wtfpl/

Installation

Download a pre-minified package from here.

  • Reference sunlight-all-min.js OR sunlight-min.js and language files of your choice.
  • Reference a theme stylesheet (in themes/) or provide your own stylesheet.
  • Place code inside an element with the class "sunlight-highlight-{language}" where language is the id of the language. e.g. "sunlight-highlight-csharp" for C#.

Refer to the excruciatingly detailed documentation for other options.

Supported languages

  • C#
  • PHP
  • JavaScript
  • MySQL
  • XML
  • CSS
  • bash
  • T-SQL
  • Java
  • Ruby
  • Python
  • Brainfuck
  • nginx
  • C/C++
  • 6502 assembler
  • Perl
  • VB.NET
  • httpd
  • Lisp
  • Visual Studio solution files (*.sln)
  • DOS batch
  • Haskell
  • Erlang
  • Diff (unified and context)
  • Scala
  • ActionScript
  • PowerShell
  • Objective-C
  • Lua

Plugins

  • sunlight-plugin.linenumbers.js (bundled)
  • sunlight-plugin.menu.js
  • sunlight-plugin.doclinks.js

sunlight's People

Contributors

tmont avatar austinhappel avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.