highlight.js-8.2/0000755000175000017500000000000012375213477013336 5ustar boutilboutilhighlight.js-8.2/test/0000755000175000017500000000000012375213477014315 5ustar boutilboutilhighlight.js-8.2/test/special.js0000644000175000017500000000114112375213477016270 0ustar boutilboutil'use strict'; var fs = require('fs'); var hljs = require('../build'); var jsdom = require('jsdom').jsdom; var utility = require('./utility'); var filename = utility.buildPath('index.html'), page = fs.readFileSync(filename, 'utf-8'); // Allows hljs to use document global.document = jsdom(page); // Setup hljs environment hljs.configure({ tabReplace: ' ' }); hljs.initHighlighting(); describe('special cases test', function() { require('./special/explicitLanguage'); require('./special/customMarkup'); require('./special/languageAlias'); require('./special/noHighlight'); }); highlight.js-8.2/test/detect/0000755000175000017500000000000012375213477015565 5ustar boutilboutilhighlight.js-8.2/test/detect/cpp/0000755000175000017500000000000012375213477016347 5ustar boutilboutilhighlight.js-8.2/test/detect/cpp/default.txt0000644000175000017500000000052312375213477020534 0ustar boutilboutil#include #define IABS(x) ((x) < 0 ? -(x) : (x)) int main(int argc, char *argv[]) { /* An annoying "Hello World" example */ for (auto i = 0; i < 0xFFFF; i++) cout << "Hello, World!" << endl; char c = '\n'; unordered_map > m; m["key"] = "\\\\"; // this is an error return -2e3 + 12l; } highlight.js-8.2/test/detect/makefile/0000755000175000017500000000000012375213477017342 5ustar boutilboutilhighlight.js-8.2/test/detect/makefile/default.txt0000644000175000017500000000027212375213477021530 0ustar boutilboutil# Makefile BUILDDIR = _build EXTRAS ?= $(BUILDDIR)/extras .PHONY: main clean main: @echo "Building main facility..." build_main $(BUILDDIR) clean: rm -rf $(BUILDDIR)/* highlight.js-8.2/test/detect/capnproto/0000755000175000017500000000000012375213477017572 5ustar boutilboutilhighlight.js-8.2/test/detect/capnproto/default.txt0000644000175000017500000000211012375213477021751 0ustar boutilboutil@0xdbb9ad1f14bf0b36; # unique file ID, generated by `capnp id` struct Person { name @0 :Text; birthdate @3 :Date; email @1 :Text; phones @2 :List(PhoneNumber); struct PhoneNumber { number @0 :Text; type @1 :Type; enum Type { mobile @0; home @1; work @2; } } } struct Date { year @0 :Int16; month @1 :UInt8; day @2 :UInt8; flags @3 :List(Bool) = [ true, false, false, true ]; } interface Node { isDirectory @0 () -> (result :Bool); } interface Directory extends(Node) { list @0 () -> (list: List(Entry)); struct Entry { name @0 :Text; node @1 :Node; } create @1 (name :Text) -> (file :File); mkdir @2 (name :Text) -> (directory :Directory) open @3 (name :Text) -> (node :Node); delete @4 (name :Text); link @5 (name :Text, node :Node); } interface File extends(Node) { size @0 () -> (size: UInt64); read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff) -> (data: Data); # Default params = read entire file. write @2 (startAt :UInt64, data :Data); truncate @3 (size :UInt64); }highlight.js-8.2/test/detect/fsharp/0000755000175000017500000000000012375213477017050 5ustar boutilboutilhighlight.js-8.2/test/detect/fsharp/default.txt0000644000175000017500000000154612375213477021243 0ustar boutilboutilopen System // Single line comment... (* This is a multiline comment. *) let checkList alist = match alist with | [] -> 0 | [a] -> 1 | [a; b] -> 2 | [a; b; c] -> 3 | _ -> failwith "List is too big!" let text = "Some text..." let text2 = @"A ""verbatim"" string..." let catalog = """ Some "long" string... """ let rec fib x = if x <= 2 then 1 else fib(x-1) + fib(x-2) let fibs = Async.Parallel [ for i in 0..40 -> async { return fib(i) } ] |> Async.RunSynchronously type Sprocket(gears) = member this.Gears : int = gears [] type Animal = abstract Speak : unit -> unit type Widget = | RedWidget | GreenWidget type Point = {X: float; Y: float;} [] type s let minutte = 60 type DefaultMailbox<'a>() = let mutable inbox = ConcurrentQueue<'a>() let awaitMsg = new AutoResetEvent(false) highlight.js-8.2/test/detect/handlebars/0000755000175000017500000000000012375213477017670 5ustar boutilboutilhighlight.js-8.2/test/detect/handlebars/default.txt0000644000175000017500000000016512375213477022057 0ustar boutilboutil

Hours

    {{#each content.users}}
  • {{firstName}}
  • {{/each}}
highlight.js-8.2/test/detect/go/0000755000175000017500000000000012375213477016172 5ustar boutilboutilhighlight.js-8.2/test/detect/go/default.txt0000644000175000017500000000103712375213477020360 0ustar boutilboutilpackage main import ( "fmt" "os" ) const ( Sunday = iota numberOfDays // this constant is not exported ) type Foo interface { FooFunc(int, float32) (complex128, []int) } type Bar struct { os.File /* multi-line comment */ PublicData chan int } func main() { ch := make(chan int) ch <- 1 x, ok := <- ch ok = true float_var := 1.0e10 defer fmt.Println('\'') defer fmt.Println(`exitting now\`) var fv1 float64 = 0.75 go println(len("hello world!")) return } highlight.js-8.2/test/detect/fix/0000755000175000017500000000000012375213477016353 5ustar boutilboutilhighlight.js-8.2/test/detect/fix/default.txt0000644000175000017500000000130312375213477020535 0ustar boutilboutil8=FIX.4.2␁9=0␁35=8␁49=SENDERTEST␁56=TARGETTEST␁34=00000001526␁52=20120429-13:30:08.137␁1=ABC12345␁11=2012abc1234␁14=100␁17=201254321␁20=0␁30=NYSE␁31=108.20␁32=100␁38=100␁39=2␁40=1␁47=A␁54=5␁55=BRK␁59=2␁60=20120429-13:30:08.000␁65=B␁76=BROKER␁84=0␁100=NYSE␁111=100␁150=2␁151=0␁167=CS␁377=N␁10000=SampleCustomTag␁10=123␁ 8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=0000000152652=20120429-13:30:08.1371=ABC1234511=2012abc123414=10017=20125432120=030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=20120429-13:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123 highlight.js-8.2/test/detect/rust/0000755000175000017500000000000012375213477016562 5ustar boutilboutilhighlight.js-8.2/test/detect/rust/default.txt0000644000175000017500000000276712375213477020763 0ustar boutilboutiluse std; 123; // type int 123u; // type uint 123_u; // type uint 0xff00; // type int 0xff_u8; // type u8 0b1111_1111_1001_0000_i32; // type i32 123.0; // type float 0.1; // type float 3f; // type float 0.1f32; // type f32 12E+99_f64; // type f64 'a'; '\n'; '\x1A'; '\u12AS'; '\U1234ASDF'; r"hello"; r###"world"###; r##" "### "# "##; /* Factorial */ fn fac(n: int) -> int { let s: str = "This is a multi-line string. It ends with an unescaped '\"'."; let c: char = 'Ф'; let r: str = r##" raw string "##; let result = 1, i = 1; while i <= n { // No parens around the condition result *= i; i += 1; } ret result; } pure fn pure_length(ls: list) -> uint { /* ... */ } type t = map::hashtbl; let x = id::(10); // Define some modules. #[path = "foo.rs"] mod foo; impl Seq for [T] { fn len() -> uint { vec::len(self) } fn iter(b: fn(T)) { for elt in self { b(elt); } } } enum list { Nil; Cons(T, @list); } let a: list = Cons(7, @cons(13, @nil)); struct Baz<'a> { baz: &'a str, } 'h: for i in range(0,10) { 'g: loop { if i % 2 == 0 { continue 'h; } if i == 9 { break 'h; } break 'g; } } highlight.js-8.2/test/detect/erlang-repl/0000755000175000017500000000000012375213477017775 5ustar boutilboutilhighlight.js-8.2/test/detect/erlang-repl/default.txt0000644000175000017500000000044212375213477022162 0ustar boutilboutil1> Str = "abcd". "abcd" 2> L = test:length(Str). 4 3> Descriptor = {L, list_to_atom(Str)}. {4,abcd} 4> L. 4 5> b(). Descriptor = {4,abcd} L = 4 Str = "abcd" ok 6> f(L). ok 7> b(). Descriptor = {4,abcd} Str = "abcd" ok 8> {L, _} = Descriptor. {4,abcd} 9> L. 4 10> 2#101. 5 11> 1.85e+3. 1850 highlight.js-8.2/test/detect/haxe/0000755000175000017500000000000012375213477016512 5ustar boutilboutilhighlight.js-8.2/test/detect/haxe/default.txt0000644000175000017500000000131312375213477020675 0ustar boutilboutil // quicksort example from http://haxe.org/doc/snip/quicksort class Quicksort { static var arr = [4,8,0,3,9,1,5,2,6,7]; static function quicksort( lo : Int, hi : Int ) : Void { var i = lo; var j = hi; var buf = arr; var p = buf[(lo+hi)>>1]; while( i <= j ) { while( arr[i] > p ) i++; while( arr[j] < p ) j--; if( i <= j ) { var t = buf[i]; buf[i++] = buf[j]; buf[j--] = t; } } if( lo < j ) quicksort( lo, j ); if( i < hi ) quicksort( i, hi ); } static function main() { quicksort( 0, arr.length-1 ); trace(arr); } } highlight.js-8.2/test/detect/avrasm/0000755000175000017500000000000012375213477017056 5ustar boutilboutilhighlight.js-8.2/test/detect/avrasm/default.txt0000644000175000017500000000077512375213477021254 0ustar boutilboutil;* Title: Block Copy Routines ;* Version: 1.1 .include "8515def.inc" rjmp RESET ;reset handle .def flashsize=r16 ;size of block to be copied flash2ram: lpm ;get constant st Y+,r0 ;store in SRAM and increment Y-pointer adiw ZL,1 ;increment Z-pointer dec flashsize brne flash2ram ;if not end of table, loop more ret .def ramtemp =r1 ;temporary storage register .def ramsize =r16 ;size of block to be copied highlight.js-8.2/test/detect/objectivec/0000755000175000017500000000000012375213477017702 5ustar boutilboutilhighlight.js-8.2/test/detect/objectivec/default.txt0000644000175000017500000000136312375213477022072 0ustar boutilboutil#import #import "Dependency.h" @protocol WorldDataSource @optional - (NSString*)worldName; @required - (BOOL)allowsToLive; @end @interface Test : NSObject { NSString *_greeting; } @property (nonatomic, readonly) NSString *greeting; - (IBAction) show; @end @implementation Test @synthesize test=_test; + (id) test { return [self testWithGreeting:@"Hello, world!\nFoo bar!"]; } + (id) testWithGreeting:(NSString*)greeting { return [[[self alloc] initWithGreeting:greeting] autorelease]; } - (id) initWithGreeting:(NSString*)greeting { if ( (self = [super init]) ) { _greeting = [greeting retain]; } return self; } - (void) dealloc { [_greeting release]; [super dealloc]; } @end highlight.js-8.2/test/detect/gradle/0000755000175000017500000000000012375213477017023 5ustar boutilboutilhighlight.js-8.2/test/detect/gradle/default.txt0000644000175000017500000000323112375213477021207 0ustar boutilboutil apply plugin: 'android' android { compileSdkVersion 19 buildToolsVersion "19.1" defaultConfig { minSdkVersion 15 targetSdkVersion 19 versionCode 5 versionName "0.4.4" } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } signingConfigs { release } buildTypes { release { // runProguard true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.release } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.example:example-lib:1.0.0' } def propFile = file('../signing.properties') if( propFile.canRead() ) { def Properties p = new Properties() p.load(new FileInputStream(propFile)) if( p!=null && p.containsKey("STORE_FILE") && p.containsKey('STORE_PASSWORD') && p.containsKey('KEY_ALIAS') && p.containsKey('KEY_PASSWORD') ) { println "RELEASE_BUILD: Signing..." android.signingConfigs.release.storeFile = file( p['STORE_FILE'] ) android.signingConfigs.release.storePassword = p['STORE_PASSWORD'] android.signingConfigs.release.keyAlias = p['KEY_ALIAS'] android.signingConfigs.release.keyPassword = p['KEY_PASSWORD'] } else { println "RELEASE_BUILD: Required properties in signing.properties are missing" android.buildTypes.release.signingConfig = null } } else { println "RELEASE_BUILD: signing.properties not found" android.buildTypes.release.signingProperties = null } highlight.js-8.2/test/detect/q/0000755000175000017500000000000012375213477016025 5ustar boutilboutilhighlight.js-8.2/test/detect/q/default.txt0000644000175000017500000000073012375213477020212 0ustar boutilboutilselect time, price by date,stock from quote where price=(max;price)fby stock data:raze value flip trade select vwap:size wavg price by 5 xbar time.minute from aapl where date within (.z.d-10;.z.d) f1:{[x;y;z] show (x;y+z);sum 1 2 3} .z.pc:{[handle] show -3!(`long$.z.p;"Closed";handle)} // random normal distribution, e.g. nor 10 nor:{$[x=2*n:x div 2;raze sqrt[-2*log n?1f]*/:(sin;cos)@\:(2*pi)*n?1f;-1_.z.s 1+x]} mode:{where g=max g:count each group x} // mode functionhighlight.js-8.2/test/detect/erlang/0000755000175000017500000000000012375213477017035 5ustar boutilboutilhighlight.js-8.2/test/detect/erlang/default.txt0000644000175000017500000000234412375213477021225 0ustar boutilboutil-module(ssh_cli). -behaviour(ssh_channel). -include("ssh.hrl"). %% backwards compatibility -export([listen/1, listen/2, listen/3, listen/4, stop/1]). if L =/= [] -> % If L is not empty sum(L) / count(L); true -> error end. %% state -record(state, { cm, channel }). -spec foo(integer()) -> integer(). foo(X) -> 1 + X. test(Foo)->Foo. init([Shell, Exec]) -> {ok, #state{shell = Shell, exec = Exec}}; init([Shell]) -> false = not true, io:format("Hello, \"~p!~n", [atom_to_list('World')]), {ok, #state{shell = Shell}}. concat([Single]) -> Single; concat(RList) -> EpsilonFree = lists:filter( fun (Element) -> case Element of epsilon -> false; _ -> true end end, RList), case EpsilonFree of [Single] -> Single; Other -> {concat, Other} end. union_dot_union({union, _}=U1, {union, _}=U2) -> union(lists:flatten( lists:map( fun (X1) -> lists:map( fun (X2) -> concat([X1, X2]) end, union_to_list(U2) ) end, union_to_list(U1) ))). highlight.js-8.2/test/detect/dart/0000755000175000017500000000000012375213477016517 5ustar boutilboutilhighlight.js-8.2/test/detect/dart/default.txt0000644000175000017500000000122112375213477020700 0ustar boutilboutillibrary app; import 'dart:html'; part 'app2.dart'; /** * Class description and [link](http://dartlang.org/). */ @Awesome('it works!') class SomeClass extends BaseClass implements Comparable { factory SomeClass(num param); SomeClass._internal(int q) : super() { assert(q != 1); double z = 0.0; } /// **Sum** function int sum(int a, int b) => a + b; ElementList els() => querySelectorAll('.dart'); } String str = ' (${'parameter' + 'zxc'})'; String str = " (${true ? 2 + 2 / 2 : null})"; String str = r'\nraw\'; String str = r"\nraw\"; var str = ''' Something ${2+3} '''; var str = r""" Something ${2+3} """; highlight.js-8.2/test/detect/gherkin/0000755000175000017500000000000012375213477017214 5ustar boutilboutilhighlight.js-8.2/test/detect/gherkin/default.txt0000644000175000017500000000123612375213477021403 0ustar boutilboutil# language: en Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers @this_is_a_tag Scenario Outline: Add two numbers * I have a calculator Given I have entered into the calculator And I have entered into the calculator When I press