├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE.txt ├── META ├── Makefile ├── PATENTS.txt ├── README.md ├── _tags ├── bsconfig.json ├── docs ├── LICENSE ├── Makefile ├── Notes.md ├── ORIGINS.md ├── api.html ├── bower.json ├── flatdoc.js ├── fontSupport │ ├── OFL.txt │ ├── montserrat.woff2 │ └── montserratCSS.css ├── highlightJs │ ├── AUTHORS.en.txt │ ├── AUTHORS.ru.txt │ ├── CHANGES.md │ ├── CUSTOMBUILD.md │ ├── LICENSE │ ├── README.md │ ├── README.ru.md │ ├── build │ │ ├── demo │ │ │ ├── demo.js │ │ │ ├── index.html │ │ │ ├── jquery-2.1.1.min.js │ │ │ ├── perfect-scrollbar.min.css │ │ │ ├── perfect-scrollbar.min.js │ │ │ ├── style.css │ │ │ └── styles │ │ │ │ ├── agate.css │ │ │ │ ├── androidstudio.css │ │ │ │ ├── arta.css │ │ │ │ ├── ascetic.css │ │ │ │ ├── atelier-cave.dark.css │ │ │ │ ├── atelier-cave.light.css │ │ │ │ ├── atelier-dune.dark.css │ │ │ │ ├── atelier-dune.light.css │ │ │ │ ├── atelier-estuary.dark.css │ │ │ │ ├── atelier-estuary.light.css │ │ │ │ ├── atelier-forest.dark.css │ │ │ │ ├── atelier-forest.light.css │ │ │ │ ├── atelier-heath.dark.css │ │ │ │ ├── atelier-heath.light.css │ │ │ │ ├── atelier-lakeside.dark.css │ │ │ │ ├── atelier-lakeside.light.css │ │ │ │ ├── atelier-plateau.dark.css │ │ │ │ ├── atelier-plateau.light.css │ │ │ │ ├── atelier-savanna.dark.css │ │ │ │ ├── atelier-savanna.light.css │ │ │ │ ├── atelier-seaside.dark.css │ │ │ │ ├── atelier-seaside.light.css │ │ │ │ ├── atelier-sulphurpool.dark.css │ │ │ │ ├── atelier-sulphurpool.light.css │ │ │ │ ├── brown_paper.css │ │ │ │ ├── brown_papersq.png │ │ │ │ ├── codepen-embed.css │ │ │ │ ├── color-brewer.css │ │ │ │ ├── dark.css │ │ │ │ ├── darkula.css │ │ │ │ ├── default.css │ │ │ │ ├── docco.css │ │ │ │ ├── far.css │ │ │ │ ├── foundation.css │ │ │ │ ├── github-gist.css │ │ │ │ ├── github.css │ │ │ │ ├── googlecode.css │ │ │ │ ├── grayscale.css │ │ │ │ ├── hopscotch.css │ │ │ │ ├── hybrid.css │ │ │ │ ├── idea.css │ │ │ │ ├── ir_black.css │ │ │ │ ├── kimbie.dark.css │ │ │ │ ├── kimbie.light.css │ │ │ │ ├── magula.css │ │ │ │ ├── mono-blue.css │ │ │ │ ├── monokai.css │ │ │ │ ├── monokai_sublime.css │ │ │ │ ├── obsidian.css │ │ │ │ ├── paraiso.dark.css │ │ │ │ ├── paraiso.light.css │ │ │ │ ├── pojoaque.css │ │ │ │ ├── pojoaque.jpg │ │ │ │ ├── railscasts.css │ │ │ │ ├── rainbow.css │ │ │ │ ├── school_book.css │ │ │ │ ├── school_book.png │ │ │ │ ├── solarized_dark.css │ │ │ │ ├── solarized_light.css │ │ │ │ ├── sunburst.css │ │ │ │ ├── tomorrow-night-blue.css │ │ │ │ ├── tomorrow-night-bright.css │ │ │ │ ├── tomorrow-night-eighties.css │ │ │ │ ├── tomorrow-night.css │ │ │ │ ├── tomorrow.css │ │ │ │ ├── vs.css │ │ │ │ ├── xcode.css │ │ │ │ └── zenburn.css │ │ ├── docs │ │ │ ├── api.rst │ │ │ ├── building-testing.rst │ │ │ ├── css-classes-reference.rst │ │ │ ├── index.rst │ │ │ ├── language-contribution.rst │ │ │ ├── language-guide.rst │ │ │ ├── language-requests.rst │ │ │ ├── line-numbers.rst │ │ │ ├── reference.rst │ │ │ ├── release-process.rst │ │ │ ├── style-contribution.rst │ │ │ └── style-guide.rst │ │ └── highlight.pack.js │ ├── demo │ │ ├── demo.js │ │ ├── index.html │ │ ├── jquery-2.1.1.min.js │ │ ├── perfect-scrollbar.min.css │ │ ├── perfect-scrollbar.min.js │ │ └── style.css │ ├── docs │ │ ├── Makefile │ │ ├── _static │ │ │ └── .gitkeep │ │ ├── _templates │ │ │ └── .gitkeep │ │ ├── api.rst │ │ ├── building-testing.rst │ │ ├── conf.py │ │ ├── css-classes-reference.rst │ │ ├── index.rst │ │ ├── language-contribution.rst │ │ ├── language-guide.rst │ │ ├── language-requests.rst │ │ ├── line-numbers.rst │ │ ├── reference.rst │ │ ├── release-process.rst │ │ ├── style-contribution.rst │ │ └── style-guide.rst │ ├── package.json │ ├── src │ │ ├── highlight.js │ │ ├── languages │ │ │ ├── 1c.js │ │ │ ├── actionscript.js │ │ │ ├── apache.js │ │ │ ├── applescript.js │ │ │ ├── armasm.js │ │ │ ├── asciidoc.js │ │ │ ├── aspectj.js │ │ │ ├── autohotkey.js │ │ │ ├── autoit.js │ │ │ ├── avrasm.js │ │ │ ├── axapta.js │ │ │ ├── bash.js │ │ │ ├── brainfuck.js │ │ │ ├── cal.js │ │ │ ├── capnproto.js │ │ │ ├── ceylon.js │ │ │ ├── clojure-repl.js │ │ │ ├── clojure.js │ │ │ ├── cmake.js │ │ │ ├── coffeescript.js │ │ │ ├── cpp.js │ │ │ ├── cs.js │ │ │ ├── css.js │ │ │ ├── d.js │ │ │ ├── dart.js │ │ │ ├── delphi.js │ │ │ ├── diff.js │ │ │ ├── django.js │ │ │ ├── dns.js │ │ │ ├── dockerfile.js │ │ │ ├── dos.js │ │ │ ├── dust.js │ │ │ ├── elixir.js │ │ │ ├── elm.js │ │ │ ├── erb.js │ │ │ ├── erlang-repl.js │ │ │ ├── erlang.js │ │ │ ├── fix.js │ │ │ ├── fortran.js │ │ │ ├── fsharp.js │ │ │ ├── gams.js │ │ │ ├── gcode.js │ │ │ ├── gherkin.js │ │ │ ├── glsl.js │ │ │ ├── go.js │ │ │ ├── golo.js │ │ │ ├── gradle.js │ │ │ ├── groovy.js │ │ │ ├── haml.js │ │ │ ├── handlebars.js │ │ │ ├── haskell.js │ │ │ ├── haxe.js │ │ │ ├── http.js │ │ │ ├── inform7.js │ │ │ ├── ini.js │ │ │ ├── irpf90.js │ │ │ ├── java.js │ │ │ ├── javascript.js │ │ │ ├── json.js │ │ │ ├── julia.js │ │ │ ├── kotlin.js │ │ │ ├── lasso.js │ │ │ ├── less.js │ │ │ ├── lisp.js │ │ │ ├── livecodeserver.js │ │ │ ├── livescript.js │ │ │ ├── lua.js │ │ │ ├── makefile.js │ │ │ ├── markdown.js │ │ │ ├── mathematica.js │ │ │ ├── matlab.js │ │ │ ├── mel.js │ │ │ ├── mercury.js │ │ │ ├── mizar.js │ │ │ ├── mojolicious.js │ │ │ ├── monkey.js │ │ │ ├── nginx.js │ │ │ ├── nimrod.js │ │ │ ├── nix.js │ │ │ ├── nsis.js │ │ │ ├── objectivec.js │ │ │ ├── ocaml.js │ │ │ ├── openscad.js │ │ │ ├── oxygene.js │ │ │ ├── parser3.js │ │ │ ├── perl.js │ │ │ ├── pf.js │ │ │ ├── php.js │ │ │ ├── powershell.js │ │ │ ├── processing.js │ │ │ ├── profile.js │ │ │ ├── prolog.js │ │ │ ├── protobuf.js │ │ │ ├── puppet.js │ │ │ ├── python.js │ │ │ ├── q.js │ │ │ ├── r.js │ │ │ ├── reason.js │ │ │ ├── rib.js │ │ │ ├── roboconf.js │ │ │ ├── rsl.js │ │ │ ├── ruby.js │ │ │ ├── ruleslanguage.js │ │ │ ├── rust.js │ │ │ ├── scala.js │ │ │ ├── scheme.js │ │ │ ├── scilab.js │ │ │ ├── scss.js │ │ │ ├── smali.js │ │ │ ├── smalltalk.js │ │ │ ├── sml.js │ │ │ ├── sql.js │ │ │ ├── stata.js │ │ │ ├── step21.js │ │ │ ├── stylus.js │ │ │ ├── swift.js │ │ │ ├── tcl.js │ │ │ ├── tex.js │ │ │ ├── thrift.js │ │ │ ├── tp.js │ │ │ ├── twig.js │ │ │ ├── typescript.js │ │ │ ├── vala.js │ │ │ ├── vbnet.js │ │ │ ├── vbscript-html.js │ │ │ ├── vbscript.js │ │ │ ├── verilog.js │ │ │ ├── vhdl.js │ │ │ ├── vim.js │ │ │ ├── x86asm.js │ │ │ ├── xl.js │ │ │ ├── xml.js │ │ │ ├── xquery.js │ │ │ └── zephir.js │ │ └── styles │ │ │ ├── agate.css │ │ │ ├── androidstudio.css │ │ │ ├── arta.css │ │ │ ├── ascetic.css │ │ │ ├── atelier-cave.dark.css │ │ │ ├── atelier-cave.light.css │ │ │ ├── atelier-dune.dark.css │ │ │ ├── atelier-dune.light.css │ │ │ ├── atelier-estuary.dark.css │ │ │ ├── atelier-estuary.light.css │ │ │ ├── atelier-forest.dark.css │ │ │ ├── atelier-forest.light.css │ │ │ ├── atelier-heath.dark.css │ │ │ ├── atelier-heath.light.css │ │ │ ├── atelier-lakeside.dark.css │ │ │ ├── atelier-lakeside.light.css │ │ │ ├── atelier-plateau.dark.css │ │ │ ├── atelier-plateau.light.css │ │ │ ├── atelier-savanna.dark.css │ │ │ ├── atelier-savanna.light.css │ │ │ ├── atelier-seaside.dark.css │ │ │ ├── atelier-seaside.light.css │ │ │ ├── atelier-sulphurpool.dark.css │ │ │ ├── atelier-sulphurpool.light.css │ │ │ ├── brown_paper.css │ │ │ ├── brown_papersq.png │ │ │ ├── codepen-embed.css │ │ │ ├── color-brewer.css │ │ │ ├── dark.css │ │ │ ├── darkula.css │ │ │ ├── default.css │ │ │ ├── docco.css │ │ │ ├── far.css │ │ │ ├── foundation.css │ │ │ ├── github-gist.css │ │ │ ├── github.css │ │ │ ├── googlecode.css │ │ │ ├── grayscale.css │ │ │ ├── hopscotch.css │ │ │ ├── hybrid.css │ │ │ ├── idea.css │ │ │ ├── ir_black.css │ │ │ ├── kimbie.dark.css │ │ │ ├── kimbie.light.css │ │ │ ├── magula.css │ │ │ ├── mono-blue.css │ │ │ ├── monokai.css │ │ │ ├── monokai_sublime.css │ │ │ ├── obsidian.css │ │ │ ├── paraiso.dark.css │ │ │ ├── paraiso.light.css │ │ │ ├── pojoaque.css │ │ │ ├── pojoaque.jpg │ │ │ ├── railscasts.css │ │ │ ├── rainbow.css │ │ │ ├── school_book.css │ │ │ ├── school_book.png │ │ │ ├── solarized_dark.css │ │ │ ├── solarized_light.css │ │ │ ├── sunburst.css │ │ │ ├── tomorrow-night-blue.css │ │ │ ├── tomorrow-night-bright.css │ │ │ ├── tomorrow-night-eighties.css │ │ │ ├── tomorrow-night.css │ │ │ ├── tomorrow.css │ │ │ ├── vs.css │ │ │ ├── xcode.css │ │ │ └── zenburn.css │ ├── test │ │ ├── .gitattributes │ │ ├── api │ │ │ ├── binaryNumber.js │ │ │ ├── cNumber.js │ │ │ ├── highlightAuto.js │ │ │ ├── ident.js │ │ │ ├── index.js │ │ │ ├── number.js │ │ │ ├── starters.js │ │ │ └── underscoreIdent.js │ │ ├── detect │ │ │ ├── 1c │ │ │ │ └── default.txt │ │ │ ├── actionscript │ │ │ │ └── default.txt │ │ │ ├── apache │ │ │ │ └── default.txt │ │ │ ├── applescript │ │ │ │ └── default.txt │ │ │ ├── armasm │ │ │ │ └── default.txt │ │ │ ├── asciidoc │ │ │ │ └── default.txt │ │ │ ├── aspectj │ │ │ │ └── default.txt │ │ │ ├── autohotkey │ │ │ │ └── default.txt │ │ │ ├── autoit │ │ │ │ └── default.txt │ │ │ ├── avrasm │ │ │ │ └── default.txt │ │ │ ├── axapta │ │ │ │ └── default.txt │ │ │ ├── bash │ │ │ │ └── default.txt │ │ │ ├── brainfuck │ │ │ │ └── default.txt │ │ │ ├── cal │ │ │ │ └── default.txt │ │ │ ├── capnproto │ │ │ │ └── default.txt │ │ │ ├── ceylon │ │ │ │ └── default.txt │ │ │ ├── clojure-repl │ │ │ │ └── default.txt │ │ │ ├── clojure │ │ │ │ └── default.txt │ │ │ ├── cmake │ │ │ │ └── default.txt │ │ │ ├── coffeescript │ │ │ │ └── default.txt │ │ │ ├── cpp │ │ │ │ └── default.txt │ │ │ ├── cs │ │ │ │ └── default.txt │ │ │ ├── css │ │ │ │ ├── default.txt │ │ │ │ └── rules-only.txt │ │ │ ├── d │ │ │ │ └── default.txt │ │ │ ├── dart │ │ │ │ └── default.txt │ │ │ ├── delphi │ │ │ │ └── default.txt │ │ │ ├── diff │ │ │ │ └── default.txt │ │ │ ├── django │ │ │ │ └── default.txt │ │ │ ├── dns │ │ │ │ └── default.txt │ │ │ ├── dockerfile │ │ │ │ └── default.txt │ │ │ ├── dos │ │ │ │ └── default.txt │ │ │ ├── dust │ │ │ │ └── default.txt │ │ │ ├── elixir │ │ │ │ └── default.txt │ │ │ ├── elm │ │ │ │ └── default.txt │ │ │ ├── erb │ │ │ │ └── default.txt │ │ │ ├── erlang-repl │ │ │ │ └── default.txt │ │ │ ├── erlang │ │ │ │ └── default.txt │ │ │ ├── fix │ │ │ │ └── default.txt │ │ │ ├── fortran │ │ │ │ └── default.txt │ │ │ ├── fsharp │ │ │ │ └── default.txt │ │ │ ├── gams │ │ │ │ └── default.txt │ │ │ ├── gcode │ │ │ │ └── default.txt │ │ │ ├── gherkin │ │ │ │ └── default.txt │ │ │ ├── glsl │ │ │ │ └── default.txt │ │ │ ├── go │ │ │ │ └── default.txt │ │ │ ├── golo │ │ │ │ └── default.txt │ │ │ ├── gradle │ │ │ │ └── default.txt │ │ │ ├── groovy │ │ │ │ └── default.txt │ │ │ ├── haml │ │ │ │ └── default.txt │ │ │ ├── handlebars │ │ │ │ └── default.txt │ │ │ ├── haskell │ │ │ │ └── default.txt │ │ │ ├── haxe │ │ │ │ └── default.txt │ │ │ ├── http │ │ │ │ └── default.txt │ │ │ ├── inform7 │ │ │ │ └── default.txt │ │ │ ├── ini │ │ │ │ └── default.txt │ │ │ ├── irpf90 │ │ │ │ └── default.txt │ │ │ ├── java │ │ │ │ └── default.txt │ │ │ ├── javascript │ │ │ │ └── default.txt │ │ │ ├── json │ │ │ │ └── default.txt │ │ │ ├── julia │ │ │ │ └── default.txt │ │ │ ├── kotlin │ │ │ │ └── default.txt │ │ │ ├── lasso │ │ │ │ └── default.txt │ │ │ ├── less │ │ │ │ └── default.txt │ │ │ ├── lisp │ │ │ │ └── default.txt │ │ │ ├── livecodeserver │ │ │ │ └── default.txt │ │ │ ├── livescript │ │ │ │ └── default.txt │ │ │ ├── lua │ │ │ │ └── default.txt │ │ │ ├── makefile │ │ │ │ └── default.txt │ │ │ ├── markdown │ │ │ │ └── default.txt │ │ │ ├── mathematica │ │ │ │ └── default.txt │ │ │ ├── matlab │ │ │ │ └── default.txt │ │ │ ├── mel │ │ │ │ └── default.txt │ │ │ ├── mercury │ │ │ │ └── default.txt │ │ │ ├── mizar │ │ │ │ └── default.txt │ │ │ ├── mojolicious │ │ │ │ └── default.txt │ │ │ ├── monkey │ │ │ │ └── default.txt │ │ │ ├── nginx │ │ │ │ └── default.txt │ │ │ ├── nimrod │ │ │ │ └── default.txt │ │ │ ├── nix │ │ │ │ └── default.txt │ │ │ ├── nsis │ │ │ │ └── default.txt │ │ │ ├── objectivec │ │ │ │ └── default.txt │ │ │ ├── ocaml │ │ │ │ └── default.txt │ │ │ ├── openscad │ │ │ │ └── default.txt │ │ │ ├── oxygene │ │ │ │ └── default.txt │ │ │ ├── parser3 │ │ │ │ └── default.txt │ │ │ ├── perl │ │ │ │ └── default.txt │ │ │ ├── pf │ │ │ │ └── default.txt │ │ │ ├── php │ │ │ │ └── default.txt │ │ │ ├── powershell │ │ │ │ └── default.txt │ │ │ ├── processing │ │ │ │ └── default.txt │ │ │ ├── profile │ │ │ │ └── default.txt │ │ │ ├── prolog │ │ │ │ └── default.txt │ │ │ ├── protobuf │ │ │ │ └── default.txt │ │ │ ├── puppet │ │ │ │ └── default.txt │ │ │ ├── python │ │ │ │ └── default.txt │ │ │ ├── q │ │ │ │ └── default.txt │ │ │ ├── r │ │ │ │ └── default.txt │ │ │ ├── reason │ │ │ │ └── default.txt │ │ │ ├── rib │ │ │ │ └── default.txt │ │ │ ├── roboconf │ │ │ │ └── default.txt │ │ │ ├── rsl │ │ │ │ └── default.txt │ │ │ ├── ruby │ │ │ │ └── default.txt │ │ │ ├── ruleslanguage │ │ │ │ └── default.txt │ │ │ ├── rust │ │ │ │ └── default.txt │ │ │ ├── scala │ │ │ │ └── default.txt │ │ │ ├── scheme │ │ │ │ └── default.txt │ │ │ ├── scilab │ │ │ │ └── default.txt │ │ │ ├── scss │ │ │ │ └── default.txt │ │ │ ├── smali │ │ │ │ └── default.txt │ │ │ ├── smalltalk │ │ │ │ └── default.txt │ │ │ ├── sml │ │ │ │ └── default.txt │ │ │ ├── sql │ │ │ │ └── default.txt │ │ │ ├── stata │ │ │ │ └── default.txt │ │ │ ├── step21 │ │ │ │ └── default.txt │ │ │ ├── stylus │ │ │ │ └── default.txt │ │ │ ├── swift │ │ │ │ └── default.txt │ │ │ ├── tcl │ │ │ │ └── default.txt │ │ │ ├── tex │ │ │ │ └── default.txt │ │ │ ├── thrift │ │ │ │ └── default.txt │ │ │ ├── tp │ │ │ │ └── default.txt │ │ │ ├── twig │ │ │ │ └── default.txt │ │ │ ├── typescript │ │ │ │ └── default.txt │ │ │ ├── vala │ │ │ │ └── default.txt │ │ │ ├── vbnet │ │ │ │ └── default.txt │ │ │ ├── vbscript-html │ │ │ │ └── default.txt │ │ │ ├── vbscript │ │ │ │ └── default.txt │ │ │ ├── verilog │ │ │ │ └── default.txt │ │ │ ├── vhdl │ │ │ │ └── default.txt │ │ │ ├── vim │ │ │ │ └── default.txt │ │ │ ├── x86asm │ │ │ │ └── default.txt │ │ │ ├── xl │ │ │ │ └── default.txt │ │ │ ├── xml │ │ │ │ └── default.txt │ │ │ ├── xquery │ │ │ │ └── default.txt │ │ │ └── zephir │ │ │ │ └── default.txt │ │ ├── expect │ │ │ ├── brInPre.txt │ │ │ ├── custommarkup.txt │ │ │ ├── customtabreplace.txt │ │ │ ├── explicit.txt │ │ │ ├── languagealias.txt │ │ │ ├── shortenedexplicit.txt │ │ │ ├── sublanguages.txt │ │ │ ├── tabreplace.txt │ │ │ └── useBr.txt │ │ ├── highlight.js │ │ ├── index.html │ │ ├── markup │ │ │ ├── aspectj │ │ │ │ ├── intertype-constructor.expect.txt │ │ │ │ ├── intertype-constructor.txt │ │ │ │ ├── intertype-method.expect.txt │ │ │ │ └── intertype-method.txt │ │ │ ├── ceylon │ │ │ │ ├── nested-comments.expect.txt │ │ │ │ └── nested-comments.txt │ │ │ ├── clojure │ │ │ │ ├── symbols-numbers.expect.txt │ │ │ │ └── symbols-numbers.txt │ │ │ ├── coffeescript │ │ │ │ ├── division.expect.txt │ │ │ │ ├── division.txt │ │ │ │ ├── function.expect.txt │ │ │ │ ├── function.txt │ │ │ │ ├── regex.expect.txt │ │ │ │ └── regex.txt │ │ │ ├── cpp │ │ │ │ ├── function-params.expect.txt │ │ │ │ ├── function-params.txt │ │ │ │ ├── function-preprocessor.expect.txt │ │ │ │ ├── function-preprocessor.txt │ │ │ │ ├── function-title.expect.txt │ │ │ │ ├── function-title.txt │ │ │ │ ├── pointers-returns.expect.txt │ │ │ │ ├── pointers-returns.txt │ │ │ │ ├── primative-types.expect.txt │ │ │ │ ├── primative-types.txt │ │ │ │ ├── string-literals.expect.txt │ │ │ │ └── string-literals.txt │ │ │ ├── cs │ │ │ │ ├── dotted-namespace.expect.txt │ │ │ │ ├── dotted-namespace.txt │ │ │ │ ├── titles.expect.txt │ │ │ │ └── titles.txt │ │ │ ├── dockerfile │ │ │ │ ├── default.expect.txt │ │ │ │ └── default.txt │ │ │ ├── elixir │ │ │ │ ├── function-title.expect.txt │ │ │ │ └── function-title.txt │ │ │ ├── fortran │ │ │ │ ├── numbers.expect.txt │ │ │ │ └── numbers.txt │ │ │ ├── go │ │ │ │ ├── numbers.expect.txt │ │ │ │ └── numbers.txt │ │ │ ├── haml │ │ │ │ ├── dashed-values.expect.txt │ │ │ │ └── dashed-values.txt │ │ │ ├── haskell │ │ │ │ ├── infix.expect.txt │ │ │ │ ├── infix.txt │ │ │ │ ├── nested-comments.expect.txt │ │ │ │ └── nested-comments.txt │ │ │ ├── index.js │ │ │ ├── java │ │ │ │ ├── numbers.expect.txt │ │ │ │ ├── numbers.txt │ │ │ │ ├── titles.expect.txt │ │ │ │ └── titles.txt │ │ │ ├── javascript │ │ │ │ ├── default-parameters.expect.txt │ │ │ │ ├── default-parameters.txt │ │ │ │ ├── jsx.expect.txt │ │ │ │ ├── jsx.txt │ │ │ │ ├── keywords.expect.txt │ │ │ │ ├── keywords.txt │ │ │ │ ├── modules.expect.txt │ │ │ │ └── modules.txt │ │ │ ├── kotlin │ │ │ │ ├── class.expect.txt │ │ │ │ ├── class.txt │ │ │ │ ├── function.expect.txt │ │ │ │ └── function.txt │ │ │ ├── lasso │ │ │ │ ├── delimiters.expect.txt │ │ │ │ └── delimiters.txt │ │ │ ├── lisp │ │ │ │ ├── mec.expect.txt │ │ │ │ └── mec.txt │ │ │ ├── matlab │ │ │ │ ├── block_comment.expect.txt │ │ │ │ ├── block_comment.txt │ │ │ │ ├── cell_expansion.expect.txt │ │ │ │ ├── cell_expansion.txt │ │ │ │ ├── transpose.expect.txt │ │ │ │ └── transpose.txt │ │ │ ├── ocaml │ │ │ │ ├── literals.expect.txt │ │ │ │ ├── literals.txt │ │ │ │ ├── types.expect.txt │ │ │ │ └── types.txt │ │ │ ├── php │ │ │ │ ├── comments.expect.txt │ │ │ │ ├── comments.txt │ │ │ │ ├── heredoc.expect.txt │ │ │ │ └── heredoc.txt │ │ │ ├── python │ │ │ │ ├── matrix-multiplication.expect.txt │ │ │ │ └── matrix-multiplication.txt │ │ │ ├── ruby │ │ │ │ ├── gemfile.expect.txt │ │ │ │ ├── gemfile.txt │ │ │ │ ├── prompt.expect.txt │ │ │ │ ├── prompt.txt │ │ │ │ ├── regexes.expect.txt │ │ │ │ └── regexes.txt │ │ │ ├── rust │ │ │ │ ├── comments.expect.txt │ │ │ │ ├── comments.txt │ │ │ │ ├── numbers.expect.txt │ │ │ │ ├── numbers.txt │ │ │ │ ├── strings.expect.txt │ │ │ │ ├── strings.txt │ │ │ │ ├── traits.expect.txt │ │ │ │ ├── traits.txt │ │ │ │ ├── variables.expect.txt │ │ │ │ └── variables.txt │ │ │ ├── swift │ │ │ │ ├── functions.expect.txt │ │ │ │ └── functions.txt │ │ │ ├── twig │ │ │ │ ├── filter_with_underscore.expect.txt │ │ │ │ ├── filter_with_underscore.txt │ │ │ │ ├── template_tags.expect.txt │ │ │ │ └── template_tags.txt │ │ │ └── typescript │ │ │ │ ├── functions.expect.txt │ │ │ │ ├── functions.txt │ │ │ │ ├── jsx.expect.txt │ │ │ │ └── jsx.txt │ │ ├── mocha.opts │ │ ├── special │ │ │ ├── buildClassName.js │ │ │ ├── customMarkup.js │ │ │ ├── explicitLanguage.js │ │ │ ├── index.js │ │ │ ├── languageAlias.js │ │ │ ├── noHighlight.js │ │ │ ├── subLanguages.js │ │ │ └── useBr.js │ │ └── utility.js │ └── tools │ │ ├── all.js │ │ ├── browser.js │ │ ├── build.js │ │ ├── cdn.js │ │ ├── developer.html │ │ ├── keywordsformat.js │ │ ├── node.js │ │ ├── tasks.js │ │ └── utility.js ├── images │ └── logo-800x215.png ├── index.html ├── legacy.js ├── octicons │ ├── OCTICONS_LICENSE.txt │ ├── README.md │ ├── octicons-local.ttf │ ├── octicons.css │ ├── octicons.eot │ ├── octicons.less │ ├── octicons.scss │ ├── octicons.svg │ ├── octicons.ttf │ ├── octicons.woff │ └── sprockets-octicons.scss ├── package.json ├── support │ ├── Notes.md │ ├── blur.jpg │ ├── dox2md.js │ ├── legacy-header.js │ ├── preview.jpg │ ├── theme.css │ ├── theme.js │ └── vendor │ │ ├── Makefile │ │ ├── html5shiv.js │ │ ├── jquery.fillsize.js │ │ ├── jquery.js │ │ ├── jquery.smartquotes.js │ │ └── respond.js ├── templates │ ├── blank.html │ └── template.html └── theme-white │ ├── script.js │ ├── style.css │ └── style.styl ├── immutable.install ├── opam ├── package.json ├── perf-js ├── ImmJSRe.re ├── MapPerfTester.re ├── PerfTest.re ├── SetPerfTester.re └── VectorPerfTester.re ├── perf ├── MapPerfTester.re ├── PerfTest.re ├── SetPerfTester.re └── VectorPerfTester.re ├── reUnit ├── bsconfig.json ├── package.json └── src │ ├── ReUnit.re │ └── ReUnit.rei ├── release.js ├── src ├── Immutable.re ├── Immutable.rei ├── collections │ ├── Collection.re │ ├── ImmMap.re │ ├── ImmSet.re │ ├── Indexed.re │ ├── Iterable.re │ ├── KeyedCollection.re │ ├── KeyedIterable.re │ ├── KeyedReducer.re │ ├── NavigableCollection.re │ ├── NavigableKeyedCollection.re │ ├── NavigableMap.re │ ├── NavigableSet.re │ ├── SequentialCollection.re │ ├── TransientCollection.re │ ├── TransientNavigableCollection.re │ ├── TransientSequentialCollection.re │ └── TransientSet.re ├── core │ ├── Comparable.re │ ├── Comparator.re │ ├── Equality.re │ ├── Equatable.re │ ├── Functions.re │ ├── Hash.re │ ├── ImmList.re │ ├── MutableOption.re │ ├── Option.re │ ├── Ordering.re │ └── Sequence.re ├── indexed │ ├── CopyOnWriteArray.re │ ├── IndexedTrie.re │ ├── PersistentVector.re │ ├── TransientVector.re │ └── Vector.re ├── maps │ ├── AVLTreeMap.re │ ├── AlterResult.re │ ├── BitmapTrieIntMap.re │ ├── BitmapTrieMap.re │ ├── HashMap.re │ ├── IntMap.re │ ├── SortedMap.re │ ├── TransientHashMap.re │ └── TransientIntMap.re ├── queues │ ├── Deque.re │ ├── ImmStack.re │ └── TransientDeque.re ├── sets │ ├── AVLTreeSet.re │ ├── BitmapTrieIntSet.re │ ├── BitmapTrieSet.re │ ├── HashSet.re │ ├── IntRange.re │ ├── IntSet.re │ ├── SortedSet.re │ ├── TransientHashSet.re │ └── TransientIntSet.re └── utils │ ├── BitmapTrie.re │ ├── Preconditions.re │ └── Transient.re └── test ├── DequeTest.re ├── HashMapTest.re ├── HashSetTest.re ├── ImmutableTest.re ├── IntMapTest.re ├── IntRangeTest.re ├── IntSetTest.re ├── IterableTest.re ├── KeyedIterableTest.re ├── ListTest.re ├── MapTest.re ├── ReadOnlyArrayTest.re ├── SequenceTest.re ├── SetTest.re ├── SortedMapTest.re ├── SortedSetTest.re ├── StackTest.re ├── VectorTest.re └── testers ├── DequeTester.re ├── PersistentMapTester.re ├── PersistentSetTester.re ├── StackTester.re └── TesterConfig.re /.gitignore: -------------------------------------------------------------------------------- 1 | _build/** 2 | *~ 3 | *.byte 4 | *.cmi 5 | *.DS_Store 6 | *.exe 7 | *.cmo 8 | *.cmx 9 | *.cma 10 | *.cmxa 11 | *.cmxs 12 | *.a 13 | *.o 14 | *.annot 15 | *.run 16 | *.opt 17 | *.native 18 | *.log 19 | *.tgz 20 | node_modules 21 | 22 | # Ignore release directories 23 | immutable.[0-9]* 24 | 25 | # Ignore bsb generated merlin files 26 | .merlin 27 | /reUnit/.merlin 28 | 29 | # Ignore bsb generate lib directories 30 | /reUnit/lib 31 | /lib 32 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "6" 4 | - "6.1" 5 | - "5.11" 6 | -------------------------------------------------------------------------------- /META: -------------------------------------------------------------------------------- 1 | version = "0.0.15" 2 | description = "Persistent immutable collections for Reason" 3 | 4 | archive(byte) = "Immutable.cma" 5 | archive(native) = "Immutable.cmxa" 6 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SRC_DIRS=src,src/collections,src/sets,src/core,src/queues,src/indexed,src/maps,src/utils 2 | build: 3 | rebuild -use-ocamlfind -Is $(SRC_DIRS) src/Immutable.cma 4 | rebuild -use-ocamlfind -Is $(SRC_DIRS) src/Immutable.cmxa 5 | 6 | 7 | test-debug: 8 | rebuild -cflag -g -Is $(SRC_DIRS) -Is reUnit/src,test/testers,test ./test/ImmutableTest.byte 9 | ./ImmutableTest.byte 10 | 11 | perf-debug: 12 | rebuild -cflag -g -Is $(SRC_DIRS) -Is reUnit/src,perf ./perf/PerfTest.byte 13 | ./PerfTest.byte 14 | 15 | perf-native: 16 | rebuild -Is $(SRC_DIRS) -Is reUnit/src,perf -ocamlopt 'ocamlopt -p -inline 100 -unsafe -noassert -nodynlink' ./perf/PerfTest.native 17 | ./PerfTest.native 18 | 19 | clean: 20 | rebuild -clean 21 | -------------------------------------------------------------------------------- /_tags: -------------------------------------------------------------------------------- 1 | : -traverse 2 | : -traverse 3 | : -traverse 4 | -------------------------------------------------------------------------------- /bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "immutable-re", 3 | "refmt": 3, 4 | "bs-dev-dependencies": ["reunit"], 5 | "sources": [ 6 | { 7 | "dir": "src", 8 | "subdirs": [ 9 | {"dir": "collections", "public": "none"}, 10 | {"dir": "sets", "public": "none"}, 11 | {"dir": "core", "public": "none"}, 12 | {"dir": "queues", "public": "none"}, 13 | {"dir": "indexed", "public": "none"}, 14 | {"dir": "maps", "public": "none"}, 15 | {"dir": "utils", "public": "none"}, 16 | ], 17 | "public": ["Immutable"], 18 | }, 19 | { "dir": "test", "subdirs": ["testers"], "type": "dev" }, 20 | { "dir": "perf-js", "type": "dev" }, 21 | ], 22 | "warnings": { 23 | "number": "-8", 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | UGLIFY := ./node_modules/.bin/uglifyjs --comments "/^!/" 2 | STYLUS := ./node_modules/.bin/stylus -U -u nib 3 | DOX := ./node_modules/.bin/dox 4 | 5 | all: \ 6 | legacy.js \ 7 | theme-white/style.css \ 8 | theme-white/script.js \ 9 | Reference.md 10 | 11 | watch: 12 | while true; do make all | grep -v "Nothing"; sleep 1; done 13 | 14 | # Legacy shims for IE 15 | legacy.js: \ 16 | support/legacy-header.js \ 17 | support/vendor/html5shiv.js \ 18 | support/vendor/respond.js 19 | cat $^ > $@ 20 | 21 | %.css: %.styl 22 | (echo "/*\n\nPlease don't edit this file directly.\nInstead, edit the stylus (.styl) files and compile it to CSS on your machine.\n\n*/" ; $(STYLUS) < $<) > $@ 23 | 24 | Reference.md: flatdoc.js 25 | $(DOX) -r < $< | node support/dox2md.js --default-level 3 > $@ 26 | 27 | # $ make v/0.1.0 28 | # Makes a distribution. 29 | # 30 | v/%: all 31 | mkdir -p $@ 32 | $(UGLIFY) < flatdoc.js > $@/flatdoc.js 33 | $(UGLIFY) < legacy.js > $@/legacy.js 34 | cp -R templates $@/templates 35 | mkdir -p $@/theme-white 36 | cp theme-white/style.css $@/theme-white 37 | cp theme-white/script.js $@/theme-white 38 | 39 | .PHONY: watch 40 | -------------------------------------------------------------------------------- /docs/ORIGINS.md: -------------------------------------------------------------------------------- 1 | The primary code for these docs was forked from Flatdoc. All code forked from Flatdoc is under Flatdoc's original license. 2 | 3 | Inside of nested directories inside this `docs` directory, are copies of other 4 | projects needed to build the documentation, which are being released under 5 | their original licenses, and their original licenses are included along with their 6 | original (or potentially modified) source code. 7 | 8 | Some included fonts in the documentation are released under their own original 9 | licenses, and we have included the licenses for those fonts in the directories 10 | closest to the font files. 11 | 12 | The syntax highlighting portion of the documentation uses `highlightJs` which 13 | is included in this repo, along with its original license under 14 | `docs/highlightJs`. 15 | -------------------------------------------------------------------------------- /docs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flatdoc", 3 | "main": [ 4 | "flatdoc.js", 5 | "legacy.js", 6 | "theme-white/script.js", 7 | "theme-white/style.css" 8 | ], 9 | "version": "0.9.0", 10 | "homepage": "https://github.com/rstacruz/flatdoc", 11 | "authors": [ 12 | "Rico Sta. Cruz " 13 | ], 14 | "description": "Fetch Markdown files and render them as full pages.", 15 | "moduleType": [ 16 | "globals" 17 | ], 18 | "keywords": [ 19 | "documentation", 20 | "markdown" 21 | ], 22 | "license": "MIT", 23 | "ignore": [ 24 | "**/.*", 25 | "node_modules", 26 | "bower_components", 27 | "test", 28 | "tests" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /docs/fontSupport/montserrat.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/fontSupport/montserrat.woff2 -------------------------------------------------------------------------------- /docs/fontSupport/montserratCSS.css: -------------------------------------------------------------------------------- 1 | /* latin */ 2 | @font-face { 3 | font-family: 'Montserrat'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: local('Montserrat-Regular'), url(../fontSupport/montserrat.woff2) format('woff2'); 7 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000; 8 | } 9 | -------------------------------------------------------------------------------- /docs/highlightJs/CUSTOMBUILD.md: -------------------------------------------------------------------------------- 1 | node tools/build.js 2 | -------------------------------------------------------------------------------- /docs/highlightJs/build/demo/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-number { 16 | color: #6897BB; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-deletion { 21 | color: #cc7832; 22 | } 23 | 24 | .hljs-comment { 25 | color: #808080; 26 | } 27 | 28 | .hljs-annotation { 29 | color: #bbb529; 30 | } 31 | 32 | .hljs-string, 33 | .hljs-addition { 34 | color: #6A8759; 35 | } 36 | 37 | .hljs-function .hljs-title, 38 | .hljs-change { 39 | color: #ffc66d; 40 | } 41 | 42 | .hljs-tag .hljs-title, 43 | .hljs-doctype { 44 | color: #e8bf6a; 45 | } 46 | 47 | .hljs-tag .hljs-attribute { 48 | color: #bababa; 49 | } 50 | 51 | .hljs-tag .hljs-value { 52 | color: #a5c261; 53 | } 54 | -------------------------------------------------------------------------------- /docs/highlightJs/build/demo/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-string, 17 | .hljs-tag .hljs-value, 18 | .hljs-filter .hljs-argument, 19 | .hljs-addition, 20 | .hljs-change, 21 | .hljs-name, 22 | .apache .hljs-tag, 23 | .apache .hljs-cbracket, 24 | .nginx .hljs-built_in, 25 | .tex .hljs-formula { 26 | color: #888; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-shebang, 31 | .hljs-doctype, 32 | .hljs-pi, 33 | .hljs-deletion, 34 | .apache .hljs-sqbracket { 35 | color: #ccc; 36 | } 37 | 38 | .hljs-keyword, 39 | .hljs-tag .hljs-title, 40 | .ini .hljs-title, 41 | .lisp .hljs-title, 42 | .http .hljs-title, 43 | .nginx .hljs-title, 44 | .css .hljs-tag, 45 | .hljs-winutils, 46 | .hljs-flow, 47 | .apache .hljs-tag, 48 | .tex .hljs-command, 49 | .hljs-request, 50 | .hljs-status { 51 | font-weight: bold; 52 | } 53 | -------------------------------------------------------------------------------- /docs/highlightJs/build/demo/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/build/demo/styles/brown_papersq.png -------------------------------------------------------------------------------- /docs/highlightJs/build/demo/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/build/demo/styles/pojoaque.jpg -------------------------------------------------------------------------------- /docs/highlightJs/build/demo/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/build/demo/styles/school_book.png -------------------------------------------------------------------------------- /docs/highlightJs/build/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. highlight.js documentation master file, created by 2 | sphinx-quickstart on Wed Sep 12 23:48:27 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | ``highlight.js`` developer documentation 7 | ========================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | api 15 | language-guide 16 | reference 17 | css-classes-reference 18 | style-guide 19 | building-testing 20 | release-process 21 | 22 | Contribution: 23 | 24 | .. toctree:: 25 | :maxdepth: 1 26 | 27 | language-contribution 28 | style-contribution 29 | 30 | Miscellaneous: 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | line-numbers 36 | language-requests 37 | 38 | Links: 39 | 40 | - Code: https://github.com/isagalaev/highlight.js 41 | - Discussion: http://groups.google.com/group/highlightjs 42 | - Bug tracking: https://github.com/isagalaev/highlight.js/issues 43 | 44 | 45 | Indices and tables 46 | ================== 47 | 48 | * :ref:`genindex` 49 | * :ref:`modindex` 50 | * :ref:`search` 51 | 52 | -------------------------------------------------------------------------------- /docs/highlightJs/build/docs/language-requests.rst: -------------------------------------------------------------------------------- 1 | On requesting new languages 2 | =========================== 3 | 4 | This is a general answer to requests for adding new languages that appear from 5 | time to time in the highlight.js issue tracker and discussion group. 6 | 7 | Highlight.js doesn't have a fundamental plan for implementing languages, 8 | instead the project works by accepting language definitions from 9 | interested contributors. There are also no rules at the moment forbidding 10 | any languages from being added to the library, no matter how obscure or 11 | weird. 12 | 13 | This means that there's no point in requesting a new language without 14 | providing an implementation for it. If you want to see a particular language 15 | included in highlight.js but cannot implement it, the best way to make it 16 | happen is to get another developer interested in doing so. Here's our 17 | :doc:`language-guide`. 18 | -------------------------------------------------------------------------------- /docs/highlightJs/build/docs/release-process.rst: -------------------------------------------------------------------------------- 1 | Release process 2 | =============== 3 | 4 | Note: this is intended for core committers. 5 | 6 | * Update CHANGES.md with everything interesting since the last update. 7 | 8 | * Update version numbers: 9 | 10 | * The header in CHANGES.md (this is where the site looks for the latest version number) 11 | * ``"version"`` attribute in package.json (use ``.0`` if needed to ensure it having three parts) 12 | * Two places in docs/conf.py (``version`` and ``release``) 13 | 14 | * Commit the version changes and tag the commit with the plain version number (no "v." or anything like that) 15 | 16 | * Push the commit and the tags to master (``git push && git push --tags``) 17 | 18 | Pushing the tag triggers the update process which can be monitored at http://highlightjs.org/api/release/ 19 | 20 | When something didn't work *and* it's fixable in code (version numbers mismatch, last minute patches, etc), simply make another release incrementing the third (revision) part of the version number. 21 | -------------------------------------------------------------------------------- /docs/highlightJs/build/docs/style-contribution.rst: -------------------------------------------------------------------------------- 1 | Style contributor checklist 2 | =========================== 3 | 4 | 1. Put style definition into a .css file 5 | ---------------------------------------- 6 | 7 | Please refer to :doc:`style guide ` to make it consistent with other styles. 8 | 9 | 10 | 2. Provide meta data 11 | -------------------- 12 | 13 | Add some information about style to file header. There may be style name, original author and yours name and contacts. 14 | 15 | :: 16 | 17 | /* 18 | 19 | Mean-and-clean style (c) John Smith 20 | Ported by Jack Man 21 | 22 | */ 23 | 24 | 25 | 3. Add yourself to AUTHORS.*.txt and CHANGES.md 26 | ----------------------------------------------- 27 | 28 | If you're a new contributor add yourself to the authors list. Feel free to use either English and/or Russian version. 29 | Also it will be good to update CHANGES.md. 30 | 31 | 32 | 4. Create a pull request 33 | ------------------------ 34 | 35 | Send your contribution as a pull request on GitHub. 36 | -------------------------------------------------------------------------------- /docs/highlightJs/docs/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/docs/_static/.gitkeep -------------------------------------------------------------------------------- /docs/highlightJs/docs/_templates/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/docs/_templates/.gitkeep -------------------------------------------------------------------------------- /docs/highlightJs/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. highlight.js documentation master file, created by 2 | sphinx-quickstart on Wed Sep 12 23:48:27 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | ``highlight.js`` developer documentation 7 | ========================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | api 15 | language-guide 16 | reference 17 | css-classes-reference 18 | style-guide 19 | building-testing 20 | release-process 21 | 22 | Contribution: 23 | 24 | .. toctree:: 25 | :maxdepth: 1 26 | 27 | language-contribution 28 | style-contribution 29 | 30 | Miscellaneous: 31 | 32 | .. toctree:: 33 | :maxdepth: 1 34 | 35 | line-numbers 36 | language-requests 37 | 38 | Links: 39 | 40 | - Code: https://github.com/isagalaev/highlight.js 41 | - Discussion: http://groups.google.com/group/highlightjs 42 | - Bug tracking: https://github.com/isagalaev/highlight.js/issues 43 | 44 | 45 | Indices and tables 46 | ================== 47 | 48 | * :ref:`genindex` 49 | * :ref:`modindex` 50 | * :ref:`search` 51 | 52 | -------------------------------------------------------------------------------- /docs/highlightJs/docs/language-requests.rst: -------------------------------------------------------------------------------- 1 | On requesting new languages 2 | =========================== 3 | 4 | This is a general answer to requests for adding new languages that appear from 5 | time to time in the highlight.js issue tracker and discussion group. 6 | 7 | Highlight.js doesn't have a fundamental plan for implementing languages, 8 | instead the project works by accepting language definitions from 9 | interested contributors. There are also no rules at the moment forbidding 10 | any languages from being added to the library, no matter how obscure or 11 | weird. 12 | 13 | This means that there's no point in requesting a new language without 14 | providing an implementation for it. If you want to see a particular language 15 | included in highlight.js but cannot implement it, the best way to make it 16 | happen is to get another developer interested in doing so. Here's our 17 | :doc:`language-guide`. 18 | -------------------------------------------------------------------------------- /docs/highlightJs/docs/release-process.rst: -------------------------------------------------------------------------------- 1 | Release process 2 | =============== 3 | 4 | Note: this is intended for core committers. 5 | 6 | * Update CHANGES.md with everything interesting since the last update. 7 | 8 | * Update version numbers: 9 | 10 | * The header in CHANGES.md (this is where the site looks for the latest version number) 11 | * ``"version"`` attribute in package.json (use ``.0`` if needed to ensure it having three parts) 12 | * Two places in docs/conf.py (``version`` and ``release``) 13 | 14 | * Commit the version changes and tag the commit with the plain version number (no "v." or anything like that) 15 | 16 | * Push the commit and the tags to master (``git push && git push --tags``) 17 | 18 | Pushing the tag triggers the update process which can be monitored at http://highlightjs.org/api/release/ 19 | 20 | When something didn't work *and* it's fixable in code (version numbers mismatch, last minute patches, etc), simply make another release incrementing the third (revision) part of the version number. 21 | -------------------------------------------------------------------------------- /docs/highlightJs/docs/style-contribution.rst: -------------------------------------------------------------------------------- 1 | Style contributor checklist 2 | =========================== 3 | 4 | 1. Put style definition into a .css file 5 | ---------------------------------------- 6 | 7 | Please refer to :doc:`style guide ` to make it consistent with other styles. 8 | 9 | 10 | 2. Provide meta data 11 | -------------------- 12 | 13 | Add some information about style to file header. There may be style name, original author and yours name and contacts. 14 | 15 | :: 16 | 17 | /* 18 | 19 | Mean-and-clean style (c) John Smith 20 | Ported by Jack Man 21 | 22 | */ 23 | 24 | 25 | 3. Add yourself to AUTHORS.*.txt and CHANGES.md 26 | ----------------------------------------------- 27 | 28 | If you're a new contributor add yourself to the authors list. Feel free to use either English and/or Russian version. 29 | Also it will be good to update CHANGES.md. 30 | 31 | 32 | 4. Create a pull request 33 | ------------------------ 34 | 35 | Send your contribution as a pull request on GitHub. 36 | -------------------------------------------------------------------------------- /docs/highlightJs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "highlight.js", 3 | "description": "Syntax highlighting with language autodetection.", 4 | "keywords": [ 5 | "highlight", 6 | "syntax" 7 | ], 8 | "homepage": "https://highlightjs.org/", 9 | "version": "8.7.0", 10 | "author": { 11 | "name": "Ivan Sagalaev", 12 | "email": "maniac@softwaremaniacs.org" 13 | }, 14 | "contributors": [], 15 | "bugs": { 16 | "url": "https://github.com/isagalaev/highlight.js/issues" 17 | }, 18 | "license": "BSD-3-Clause", 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/isagalaev/highlight.js.git" 22 | }, 23 | "main": "./lib/index.js", 24 | "scripts": { 25 | "test": "./node_modules/.bin/mocha test/" 26 | }, 27 | "engines": { 28 | "node": "*" 29 | }, 30 | "devDependencies": { 31 | "bluebird": "^2.9.30", 32 | "commander": "^2.3.0", 33 | "del": "^1.1.1", 34 | "gear": "^0.9.4", 35 | "gear-lib": "^0.9.2", 36 | "glob": "^5.0.5", 37 | "jsdom": "3.1.2", 38 | "lodash": "^3.3.1", 39 | "mocha": "^2.0.1", 40 | "should": "^7.0.1" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/brainfuck.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Brainfuck 3 | Author: Evgeny Stepanischev 4 | */ 5 | 6 | function(hljs){ 7 | var LITERAL = { 8 | className: 'literal', 9 | begin: '[\\+\\-]', 10 | relevance: 0 11 | }; 12 | return { 13 | aliases: ['bf'], 14 | contains: [ 15 | hljs.COMMENT( 16 | '[^\\[\\]\\.,\\+\\-<> \r\n]', 17 | '[\\[\\]\\.,\\+\\-<> \r\n]', 18 | { 19 | returnEnd: true, 20 | relevance: 0 21 | } 22 | ), 23 | { 24 | className: 'title', 25 | begin: '[\\[\\]]', 26 | relevance: 0 27 | }, 28 | { 29 | className: 'string', 30 | begin: '[\\.,]', 31 | relevance: 0 32 | }, 33 | { 34 | // this mode works as the only relevance counter 35 | begin: /\+\+|\-\-/, returnBegin: true, 36 | contains: [LITERAL] 37 | }, 38 | LITERAL 39 | ] 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/clojure-repl.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Clojure REPL 3 | Description: Clojure REPL sessions 4 | Author: Ivan Sagalaev 5 | Requires: clojure.js 6 | Category: lisp 7 | */ 8 | 9 | function(hljs) { 10 | return { 11 | contains: [ 12 | { 13 | className: 'prompt', 14 | begin: /^([\w.-]+|\s*#_)=>/, 15 | starts: { 16 | end: /$/, 17 | subLanguage: 'clojure' 18 | } 19 | } 20 | ] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/diff.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Diff 3 | Description: Unified and context diff 4 | Author: Vasily Polovnyov 5 | Category: common 6 | */ 7 | 8 | function(hljs) { 9 | return { 10 | aliases: ['patch'], 11 | contains: [ 12 | { 13 | className: 'chunk', 14 | relevance: 10, 15 | variants: [ 16 | {begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/}, 17 | {begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/}, 18 | {begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/} 19 | ] 20 | }, 21 | { 22 | className: 'header', 23 | variants: [ 24 | {begin: /Index: /, end: /$/}, 25 | {begin: /=====/, end: /=====$/}, 26 | {begin: /^\-\-\-/, end: /$/}, 27 | {begin: /^\*{3} /, end: /$/}, 28 | {begin: /^\+\+\+/, end: /$/}, 29 | {begin: /\*{5}/, end: /\*{5}$/} 30 | ] 31 | }, 32 | { 33 | className: 'addition', 34 | begin: '^\\+', end: '$' 35 | }, 36 | { 37 | className: 'deletion', 38 | begin: '^\\-', end: '$' 39 | }, 40 | { 41 | className: 'change', 42 | begin: '^\\!', end: '$' 43 | } 44 | ] 45 | }; 46 | } 47 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/dust.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Dust 3 | Requires: xml.js 4 | Author: Michael Allen 5 | Description: Matcher for dust.js templates. 6 | Category: template 7 | */ 8 | 9 | function(hljs) { 10 | var EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep'; 11 | return { 12 | aliases: ['dst'], 13 | case_insensitive: true, 14 | subLanguage: 'xml', 15 | contains: [ 16 | { 17 | className: 'expression', 18 | begin: '{', end: '}', 19 | relevance: 0, 20 | contains: [ 21 | { 22 | className: 'begin-block', begin: '\#[a-zA-Z\-\ \.]+', 23 | keywords: EXPRESSION_KEYWORDS 24 | }, 25 | { 26 | className: 'string', 27 | begin: '"', end: '"' 28 | }, 29 | { 30 | className: 'end-block', begin: '\\\/[a-zA-Z\-\ \.]+', 31 | keywords: EXPRESSION_KEYWORDS 32 | }, 33 | { 34 | className: 'variable', begin: '[a-zA-Z\-\.]+', 35 | keywords: EXPRESSION_KEYWORDS, 36 | relevance: 0 37 | } 38 | ] 39 | } 40 | ] 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/erb.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: ERB (Embedded Ruby) 3 | Requires: xml.js, ruby.js 4 | Author: Lucas Mazza 5 | Contributors: Kassio Borges 6 | Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %> 7 | Category: template 8 | */ 9 | 10 | function(hljs) { 11 | return { 12 | subLanguage: 'xml', 13 | contains: [ 14 | hljs.COMMENT('<%#', '%>'), 15 | { 16 | begin: '<%[%=-]?', end: '[%-]?%>', 17 | subLanguage: 'ruby', 18 | excludeBegin: true, 19 | excludeEnd: true 20 | } 21 | ] 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/fix.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: FIX 3 | Author: Brent Bradbury 4 | */ 5 | 6 | function(hljs) { 7 | return { 8 | contains: [ 9 | { 10 | begin: /[^\u2401\u0001]+/, 11 | end: /[\u2401\u0001]/, 12 | excludeEnd: true, 13 | returnBegin: true, 14 | returnEnd: false, 15 | contains: [ 16 | { 17 | begin: /([^\u2401\u0001=]+)/, 18 | end: /=([^\u2401\u0001=]+)/, 19 | returnEnd: true, 20 | returnBegin: false, 21 | className: 'attribute' 22 | }, 23 | { 24 | begin: /=/, 25 | end: /([\u2401\u0001])/, 26 | excludeEnd: true, 27 | excludeBegin: true, 28 | className: 'string' 29 | }] 30 | }], 31 | case_insensitive: true 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/gherkin.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Gherkin 3 | Author: Sam Pikesley (@pikesley) 4 | Description: Gherkin (Cucumber etc) 5 | */ 6 | 7 | function (hljs) { 8 | return { 9 | aliases: ['feature'], 10 | keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When', 11 | contains: [ 12 | { 13 | className: 'keyword', 14 | begin: '\\*' 15 | }, 16 | hljs.COMMENT('@[^@\r\n\t ]+', '$'), 17 | { 18 | begin: '\\|', end: '\\|\\w*$', 19 | contains: [ 20 | { 21 | className: 'string', 22 | begin: '[^|]+' 23 | } 24 | ] 25 | }, 26 | { 27 | className: 'variable', 28 | begin: '<', end: '>' 29 | }, 30 | hljs.HASH_COMMENT_MODE, 31 | { 32 | className: 'string', 33 | begin: '"""', end: '"""' 34 | }, 35 | hljs.QUOTE_STRING_MODE 36 | ] 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/golo.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Golo 3 | Author: Philippe Charriere 4 | Description: a lightweight dynamic language for the JVM, see http://golo-lang.org/ 5 | */ 6 | 7 | function(hljs) { 8 | return { 9 | keywords: { 10 | keyword: 11 | 'println readln print import module function local return let var ' + 12 | 'while for foreach times in case when match with break continue ' + 13 | 'augment augmentation each find filter reduce ' + 14 | 'if then else otherwise try catch finally raise throw orIfNull', 15 | typename: 16 | 'DynamicObject|10 DynamicVariable struct Observable map set vector list array', 17 | literal: 18 | 'true false null' 19 | }, 20 | contains: [ 21 | hljs.HASH_COMMENT_MODE, 22 | hljs.QUOTE_STRING_MODE, 23 | hljs.C_NUMBER_MODE, 24 | { 25 | className: 'annotation', begin: '@[A-Za-z]+' 26 | } 27 | ] 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/http.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: HTTP 3 | Description: HTTP request and response headers with automatic body highlighting 4 | Author: Ivan Sagalaev 5 | Category: common, protocols 6 | */ 7 | 8 | function(hljs) { 9 | return { 10 | aliases: ['https'], 11 | illegal: '\\S', 12 | contains: [ 13 | { 14 | className: 'status', 15 | begin: '^HTTP/[0-9\\.]+', end: '$', 16 | contains: [{className: 'number', begin: '\\b\\d{3}\\b'}] 17 | }, 18 | { 19 | className: 'request', 20 | begin: '^[A-Z]+ (.*?) HTTP/[0-9\\.]+$', returnBegin: true, end: '$', 21 | contains: [ 22 | { 23 | className: 'string', 24 | begin: ' ', end: ' ', 25 | excludeBegin: true, excludeEnd: true 26 | } 27 | ] 28 | }, 29 | { 30 | className: 'attribute', 31 | begin: '^\\w', end: ': ', excludeEnd: true, 32 | illegal: '\\n|\\s|=', 33 | starts: {className: 'string', end: '$'} 34 | }, 35 | { 36 | begin: '\\n\\n', 37 | starts: {subLanguage: [], endsWithParent: true} 38 | } 39 | ] 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/mizar.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Mizar 3 | Author: Kelley van Evert 4 | Category: scientific 5 | */ 6 | 7 | function(hljs) { 8 | return { 9 | keywords: 10 | 'environ vocabularies notations constructors definitions ' + 11 | 'registrations theorems schemes requirements begin end definition ' + 12 | 'registration cluster existence pred func defpred deffunc theorem ' + 13 | 'proof let take assume then thus hence ex for st holds consider ' + 14 | 'reconsider such that and in provided of as from be being by means ' + 15 | 'equals implies iff redefine define now not or attr is mode ' + 16 | 'suppose per cases set thesis contradiction scheme reserve struct ' + 17 | 'correctness compatibility coherence symmetry assymetry ' + 18 | 'reflexivity irreflexivity connectedness uniqueness commutativity ' + 19 | 'idempotence involutiveness projectivity', 20 | contains: [ 21 | hljs.COMMENT('::', '$') 22 | ] 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/mojolicious.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: Mojolicious 3 | Requires: xml.js, perl.js 4 | Author: Dotan Dimet 5 | Description: Mojolicious .ep (Embedded Perl) templates 6 | Category: template 7 | */ 8 | function(hljs) { 9 | return { 10 | subLanguage: 'xml', 11 | contains: [ 12 | { 13 | className: 'preprocessor', 14 | begin: '^__(END|DATA)__$' 15 | }, 16 | // mojolicious line 17 | { 18 | begin: "^\\s*%{1,2}={0,2}", end: '$', 19 | subLanguage: 'perl' 20 | }, 21 | // mojolicious block 22 | { 23 | begin: "<%{1,2}={0,2}", 24 | end: "={0,1}%>", 25 | subLanguage: 'perl', 26 | excludeBegin: true, 27 | excludeEnd: true 28 | } 29 | ] 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /docs/highlightJs/src/languages/vbscript-html.js: -------------------------------------------------------------------------------- 1 | /* 2 | Language: VBScript in HTML 3 | Requires: xml.js, vbscript.js 4 | Author: Ivan Sagalaev 5 | Description: "Bridge" language defining fragments of VBScript in HTML within <% .. %> 6 | Category: scripting 7 | */ 8 | 9 | function(hljs) { 10 | return { 11 | subLanguage: 'xml', 12 | contains: [ 13 | { 14 | begin: '<%', end: '%>', 15 | subLanguage: 'vbscript' 16 | } 17 | ] 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /docs/highlightJs/src/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-number { 16 | color: #6897BB; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-deletion { 21 | color: #cc7832; 22 | } 23 | 24 | .hljs-comment { 25 | color: #808080; 26 | } 27 | 28 | .hljs-annotation { 29 | color: #bbb529; 30 | } 31 | 32 | .hljs-string, 33 | .hljs-addition { 34 | color: #6A8759; 35 | } 36 | 37 | .hljs-function .hljs-title, 38 | .hljs-change { 39 | color: #ffc66d; 40 | } 41 | 42 | .hljs-tag .hljs-title, 43 | .hljs-doctype { 44 | color: #e8bf6a; 45 | } 46 | 47 | .hljs-tag .hljs-attribute { 48 | color: #bababa; 49 | } 50 | 51 | .hljs-tag .hljs-value { 52 | color: #a5c261; 53 | } 54 | -------------------------------------------------------------------------------- /docs/highlightJs/src/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-string, 17 | .hljs-tag .hljs-value, 18 | .hljs-filter .hljs-argument, 19 | .hljs-addition, 20 | .hljs-change, 21 | .hljs-name, 22 | .apache .hljs-tag, 23 | .apache .hljs-cbracket, 24 | .nginx .hljs-built_in, 25 | .tex .hljs-formula { 26 | color: #888; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-shebang, 31 | .hljs-doctype, 32 | .hljs-pi, 33 | .hljs-deletion, 34 | .apache .hljs-sqbracket { 35 | color: #ccc; 36 | } 37 | 38 | .hljs-keyword, 39 | .hljs-tag .hljs-title, 40 | .ini .hljs-title, 41 | .lisp .hljs-title, 42 | .http .hljs-title, 43 | .nginx .hljs-title, 44 | .css .hljs-tag, 45 | .hljs-winutils, 46 | .hljs-flow, 47 | .apache .hljs-tag, 48 | .tex .hljs-command, 49 | .hljs-request, 50 | .hljs-status { 51 | font-weight: bold; 52 | } 53 | -------------------------------------------------------------------------------- /docs/highlightJs/src/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/src/styles/brown_papersq.png -------------------------------------------------------------------------------- /docs/highlightJs/src/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/src/styles/pojoaque.jpg -------------------------------------------------------------------------------- /docs/highlightJs/src/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/immutable-re/d55f65f7fc638ac17cfdd8064a0401d4cde5aad2/docs/highlightJs/src/styles/school_book.png -------------------------------------------------------------------------------- /docs/highlightJs/test/.gitattributes: -------------------------------------------------------------------------------- 1 | # Some tests *require* LF line endings 2 | * eol=lf 3 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/binaryNumber.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var hljs = require('../../build'); 4 | 5 | var pattern = new RegExp(hljs.BINARY_NUMBER_RE + '$'); 6 | 7 | describe('.BINARY_NUMBER_RE', function() { 8 | it('should match binary numbers', function() { 9 | var numbers = [ '0b0101', '0b1100', '0b1001' 10 | , '0b11110101', '0b11001111' 11 | , '0b1010111111000001' 12 | ]; 13 | 14 | numbers.should.matchEach(pattern); 15 | }); 16 | 17 | it('should not match binary numbers greater than 2', function() { 18 | var numbers = [ '0b2101', '0b1130', '0b1041' 19 | , '0b11150101', '0b11061111' 20 | , '0b1010111117000001' 21 | ]; 22 | 23 | numbers.should.not.matchEach(pattern); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/ident.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var hljs = require('../../build'); 4 | 5 | var pattern = new RegExp('^' + hljs.IDENT_RE + '$'); 6 | 7 | describe('.IDENT_RE', function() { 8 | it('should match non-underscore starting words', function() { 9 | var words = [ 'foo' , 'bar' , 'baz' 10 | , 'Foo' , 'Bar' , 'Baz' 11 | , 'f_oo', 'ba_r', 'baz_' 12 | , 'F_oo', 'Ba_r', 'Baz_' 13 | ]; 14 | 15 | words.should.matchEach(pattern); 16 | }); 17 | 18 | it('should not match underscore starting words', function() { 19 | var words = [ '_foo' , '_bar' , '_baz' 20 | , '_Foo' , '_Bar' , '_Baz' 21 | , '_f_oo', '_ba_r', '_baz_' 22 | , '_F_oo', '_Ba_r', '_Baz_' 23 | ]; 24 | 25 | words.should.not.matchEach(pattern); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('hljs', function() { 4 | require('./highlightAuto'); 5 | require('./ident'); 6 | require('./underscoreIdent'); 7 | require('./number'); 8 | require('./cNumber'); 9 | require('./binaryNumber'); 10 | require('./starters'); 11 | }); 12 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/number.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var _ = require('lodash'); 4 | var hljs = require('../../build'); 5 | var utility = require('../utility'); 6 | 7 | var pattern = new RegExp(hljs.NUMBER_RE + '$'); 8 | var numberToString = utility.numberToString; 9 | 10 | describe('.NUMBER_RE', function() { 11 | it('should match regular numbers and decimals', function() { 12 | var number = _.map(_.range(0, 1001), numberToString); 13 | var decimal = _.map(_.range(0, 1.001, 0.001), numberToString); 14 | var noLeadingZero = ['.1234', '.5206', '.0002', '.9998']; 15 | 16 | var numbers = [].concat(number, decimal, noLeadingZero); 17 | 18 | numbers.should.matchEach(pattern); 19 | }); 20 | 21 | it('should not match hex or binary numbers', function() { 22 | var numbers = [ '0xbada55', '0xfa1755', '0x45362e' 23 | , '0b0101' , '0b1100' , '0b1001' 24 | ]; 25 | 26 | numbers.should.not.matchEach(pattern); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/starters.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var hljs = require('../../build'); 4 | 5 | var pattern = new RegExp('^' + hljs.RE_STARTERS_RE + '$'); 6 | 7 | describe('.RE_STARTERS_RE', function() { 8 | it('should match boolean operators', function() { 9 | var operators = [ '!', '!=', '!==', '==', '===', '<=', '>=' 10 | , '<', '>', '||', '&&', '?' 11 | ]; 12 | 13 | operators.should.matchEach(pattern); 14 | }); 15 | 16 | it('should match arithmetic operators', function() { 17 | var operators = [ '*', '*=', '+', '+=', '-', '-=', '/', '/=' 18 | , '%', '%=' 19 | ]; 20 | 21 | operators.should.matchEach(pattern); 22 | }); 23 | 24 | it('should match binary operators', function() { 25 | var operators = [ '&', '&=', '|', '|=', '<<', '<<=', '>>', '>>=' 26 | , '>>>', '>>>=', '^', '^=', '~' 27 | ]; 28 | 29 | operators.should.matchEach(pattern); 30 | }); 31 | 32 | it('should match miscellaneous operators', function() { 33 | var operators = [',', '=', ':', ';', '[', '{', '(']; 34 | 35 | operators.should.matchEach(pattern); 36 | }); 37 | }); 38 | -------------------------------------------------------------------------------- /docs/highlightJs/test/api/underscoreIdent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var hljs = require('../../build'); 4 | 5 | var pattern = new RegExp('^' + hljs.UNDERSCORE_IDENT_RE + '$'); 6 | 7 | describe('.UNDERSCORE_IDENT_RE', function() { 8 | it('should match any word starting without numbers', function() { 9 | var words = [ 'foo' , 'bar' , 'baz' 10 | , 'Foo' , 'Bar' , 'Baz' 11 | , '_foo' , '_bar' , '_baz' 12 | , '_Foo' , '_Bar' , '_Baz' 13 | , '_f_oo', '_ba_r', '_baz_' 14 | , '_F_oo', '_Ba_r', '_Baz_' 15 | ]; 16 | 17 | words.should.matchEach(pattern); 18 | }); 19 | 20 | it('should not match any word starting with numbers', function() { 21 | var words = [ '1foo' , '6bar' , '0baz' 22 | , '2Foo' , '7Bar' , '1Baz' 23 | , '3f_oo', '8ba_r', '2baz_' 24 | , '4F_oo', '9Ba_r', '3Baz_' 25 | ]; 26 | 27 | words.should.not.matchEach(pattern); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/1c/default.txt: -------------------------------------------------------------------------------- 1 | #Если Клиент Тогда 2 | Перем СимвольныйКодКаталога = "ля-ля-ля"; //комментарий 3 | Функция Сообщить(Знач ТекстСообщения, ТекстСообщения2) Экспорт //комментарий к функции 4 | x=ТекстСообщения+ТекстСообщения2+" 5 | |строка1 6 | |строка2 7 | |строка3"; 8 | КонецФункции 9 | #КонецЕсли 10 | 11 | // Процедура ПриНачалеРаботыСистемы 12 | // 13 | Процедура ПриНачалеРаботыСистемы() 14 | Обработки.Помощник.ПолучитьФорму("Форма").Открыть(); 15 | d = '21.01.2008' 16 | КонецПроцедуры 17 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/actionscript/default.txt: -------------------------------------------------------------------------------- 1 | package org.example.dummy { 2 | import org.dummy.*; 3 | 4 | /*define package inline interface*/ 5 | public interface IFooBarzable { 6 | public function foo(... pairs):Array; 7 | } 8 | 9 | public class FooBar implements IFooBarzable { 10 | static private var cnt:uint = 0; 11 | private var bar:String; 12 | 13 | //constructor 14 | public function TestBar(bar:String):void { 15 | bar = bar; 16 | ++cnt; 17 | } 18 | 19 | public function foo(... pairs):Array { 20 | pairs.push(bar); 21 | return pairs; 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/apache/default.txt: -------------------------------------------------------------------------------- 1 | # rewrite`s rules for wordpress pretty url 2 | LoadModule rewrite_module modules/mod_rewrite.so 3 | RewriteCond %{REQUEST_FILENAME} !-f 4 | RewriteCond %{REQUEST_FILENAME} !-d 5 | RewriteRule . index.php [NC,L] 6 | 7 | ExpiresActive On 8 | ExpiresByType application/x-javascript "access plus 1 days" 9 | 10 | Order Deny,Allow 11 | Allow from All 12 | 13 | 14 | RewriteMap map txt:map.txt 15 | RewriteMap lower int:tolower 16 | RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC] 17 | RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND 18 | RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L] 19 | 20 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/applescript/default.txt: -------------------------------------------------------------------------------- 1 | repeat 5 times 2 | if foo is greater than bar then 3 | display dialog "Hello there" 4 | else 5 | beep 6 | end if 7 | end repeat 8 | 9 | (* comment (*nested comment*) *) 10 | on do_something(s, y) 11 | return {s + pi, y mod 4} 12 | end do_something 13 | 14 | do shell script "/bin/echo 'hello'" 15 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/armasm/default.txt: -------------------------------------------------------------------------------- 1 | .text 2 | 3 | .global connect 4 | connect: 5 | mov r3, #2 ; s->sin_family = AF_INET 6 | strh r3, [sp] 7 | ldr r3, =server_port ; s->sin_port = server_port 8 | ldr r3, [r3] 9 | strh r3, [sp, #2] 10 | ldr r3, =server_addr ; s->sin_addr = server_addr 11 | ldr r3, [r3] 12 | str r3, [sp, #4] 13 | mov r3, #0 ; bzero(&s->sin_zero) 14 | str r3, [sp, #8] 15 | str r3, [sp, #12] 16 | mov r1, sp ; const struct sockaddr *addr = sp 17 | 18 | ldr r7, =connect_call 19 | ldr r7, [r7] 20 | swi #0 21 | 22 | add sp, sp, #16 23 | pop {r0} ; pop sockfd 24 | 25 | pop {r7} 26 | pop {fp, ip, lr} 27 | mov sp, ip 28 | bx lr 29 | 30 | .data 31 | socket_call: .long 281 32 | connect_call: .long 283 33 | 34 | /* all addresses are network byte-order (big-endian) */ 35 | server_addr: .long 0x0100007f ; localhost 36 | server_port: .hword 0x0b1a 37 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/aspectj/default.txt: -------------------------------------------------------------------------------- 1 | package com.aspectj.syntax; 2 | import org.aspectj.lang.annotation.AdviceName; 3 | 4 | privileged public aspect LoggingAspect percflowbelow(ajia.services.*){ 5 | private pointcut getResult() : call(* *(..) throws SQLException) && args(Account, .., int); 6 | @AdviceName("CheckValidEmail") 7 | before (Customer hu) : getResult(hu){ 8 | System.out.println("Your mail address is valid!"); 9 | } 10 | Object around() throws InsufficientBalanceException: getResult() && call(Customer.new(String,String,int,int,int)){ 11 | return proceed(); 12 | } 13 | public Cache getCache() { 14 | return this.cache; 15 | } 16 | pointcut beanPropertyChange(BeanSupport bean, Object newValue): execution(void BeanSupport+.set*(*)) && args(newValue) && this(bean); 17 | declare parents: banking.entities.* implements BeanSupport; 18 | declare warning : call(void TestSoftening.perform()): "Please ensure you are not calling this from an AWT thread"; 19 | private String Identifiable.id; 20 | public void Identifiable.setId(String id) { 21 | this.id = id; 22 | } 23 | } -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/autohotkey/default.txt: -------------------------------------------------------------------------------- 1 | ; hotkeys and hotstrings 2 | #a::WinSet, AlwaysOnTop, Toggle, A 3 | #Space:: 4 | MsgBox, Percent sign (`%) need to be escaped. 5 | Run "C:\Program Files\some\program.exe" 6 | Gosub, label1 7 | return 8 | ::btw::by the way 9 | ; volume 10 | #Numpad8::Send {Volume_Up} 11 | #Numpad5::Send {Volume_Mute} 12 | #Numpad2::Send {Volume_Down} 13 | 14 | label1: 15 | if (Clipboard = "") 16 | { 17 | MsgBox, , Clipboard, Empty! 18 | } 19 | else 20 | { 21 | StringReplace, temp, Clipboard, old, new, All 22 | MsgBox, , Clipboard, %temp% 23 | } 24 | return 25 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/autoit/default.txt: -------------------------------------------------------------------------------- 1 | #NoTrayIcon 2 | #AutoIt3Wrapper_Run_Tidy=Y 3 | #include 4 | 5 | _Singleton(@ScriptName) ; Allow only one instance 6 | example(0, 10) 7 | 8 | Func example($min, $max) 9 | For $i = $min To $max 10 | If Mod($i, 2) == 0 Then 11 | MsgBox(64, "Message", $i & ' is even number!') 12 | Else 13 | MsgBox(64, "Message", $i & ' is odd number!') 14 | EndIf 15 | Next 16 | EndFunc ;==>example -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/avrasm/default.txt: -------------------------------------------------------------------------------- 1 | ;* Title: Block Copy Routines 2 | ;* Version: 1.1 3 | 4 | .include "8515def.inc" 5 | 6 | rjmp RESET ;reset handle 7 | 8 | .def flashsize=r16 ;size of block to be copied 9 | 10 | flash2ram: 11 | lpm ;get constant 12 | st Y+,r0 ;store in SRAM and increment Y-pointer 13 | adiw ZL,1 ;increment Z-pointer 14 | dec flashsize 15 | brne flash2ram ;if not end of table, loop more 16 | ret 17 | 18 | .def ramtemp =r1 ;temporary storage register 19 | .def ramsize =r16 ;size of block to be copied 20 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/axapta/default.txt: -------------------------------------------------------------------------------- 1 | class ExchRateLoadBatch extends RunBaseBatch { 2 | ExchRateLoad rbc; 3 | container currencies; 4 | boolean actual; 5 | boolean overwrite; 6 | date beg; 7 | date end; 8 | 9 | #define.CurrentVersion(5) 10 | 11 | #localmacro.CurrentList 12 | currencies, 13 | actual, 14 | beg, 15 | end 16 | #endmacro 17 | } 18 | 19 | public boolean unpack(container packedClass) { 20 | container base; 21 | boolean ret; 22 | Integer version = runbase::getVersion(packedClass); 23 | 24 | switch (version) { 25 | case #CurrentVersion: 26 | [version, #CurrentList] = packedClass; 27 | return true; 28 | default: 29 | return false; 30 | } 31 | return ret; 32 | } 33 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/bash/default.txt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ###### BEGIN CONFIG 4 | ACCEPTED_HOSTS="/root/.hag_accepted.conf" 5 | BE_VERBOSE=false 6 | ###### END CONFIG 7 | 8 | if [ "$UID" -ne 0 ] 9 | then 10 | echo "Superuser rights is required" 11 | echo 'Printing the # sign' 12 | exit 2 13 | fi 14 | 15 | if test $# -eq 0 16 | then 17 | elif test [ $1 == 'start' ] 18 | else 19 | fi 20 | 21 | genApacheConf(){ 22 | if [[ "$2" = "www" ]] 23 | then 24 | full_domain=$1 25 | else 26 | full_domain=$2.$1 27 | fi 28 | host_root="${APACHE_HOME_DIR}$1/$2/$(title)" 29 | echo -e "# Host $1/$2 :" 30 | } 31 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/brainfuck/default.txt: -------------------------------------------------------------------------------- 1 | ++++++++++ 2 | [ 3*10 and 10*10 3 | ->+++>++++++++++<< 4 | ]>> 5 | [ filling cells 6 | ->++>>++>++>+>++>>++>++>++>++>++>++>++>++>++>++>++[> 7 | ]< 8 | +++++++++<< 9 | [ rough codes correction loop 10 | ->>>+>+>+>+++>+>+>+>+>+>+>+>+>+>+>+>+>+>+[<]< 11 | ] 12 | more accurate сodes correction 13 | >>>++> 14 | -->+++++++>------>++++++>++>+++++++++>++++++++++>++++++++>--->++++++++++>------>++++++> 15 | ++>+++++++++++>++++++++++++>------>+++ 16 | rewind and output 17 | [<]>[.>] 18 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/ceylon/default.txt: -------------------------------------------------------------------------------- 1 | shared void run() { 2 | print("Hello, `` process.arguments.first else "World" ``!"); 3 | } 4 | class Counter(count=0) { 5 | variable Integer count; 6 | shared Integer currentValue => count; 7 | shared void increment() => count++; 8 | } 9 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/clojure-repl/default.txt: -------------------------------------------------------------------------------- 1 | user=> (defn f [x y] 2 | #_=> (+ x y)) 3 | #'user/f 4 | user=> (f 5 7) 5 | 12 6 | user=> nil 7 | nil 8 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/clojure/default.txt: -------------------------------------------------------------------------------- 1 | ; Comment 2 | 3 | (def 4 | ^{:macro true 5 | :added "1.0"} 6 | let (fn* let [&form &env & decl] (cons 'let* decl))) 7 | 8 | (def ^:dynamic chunk-size 17) 9 | 10 | (defn next-chunk [rdr] 11 | (let [buf (char-array chunk-size) 12 | s (.read rdr buf)] 13 | (when (pos? s) 14 | (java.nio.CharBuffer/wrap buf 0 s)))) 15 | 16 | (defn chunk-seq [rdr] 17 | (when-let [chunk (next-chunk rdr)] 18 | (cons chunk (lazy-seq (chunk-seq rdr))))) 19 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/cmake/default.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.8) 2 | project(cmake_example) 3 | 4 | # Show message on Linux platform 5 | if (${CMAKE_SYSTEM_NAME} MATCHES Linux) 6 | message("Good choice, bro!") 7 | endif() 8 | 9 | # Tell CMake to run moc when necessary: 10 | set(CMAKE_AUTOMOC ON) 11 | # As moc files are generated in the binary dir, 12 | # tell CMake to always look for includes there: 13 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 14 | 15 | # Widgets finds its own dependencies. 16 | find_package(Qt5Widgets REQUIRED) 17 | 18 | add_executable(myproject main.cpp mainwindow.cpp) 19 | qt5_use_modules(myproject Widgets) 20 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/coffeescript/default.txt: -------------------------------------------------------------------------------- 1 | grade = (student, period=(if b? then 7 else 6), messages={"A": "Excellent"}) -> 2 | if student.excellentWork 3 | "A+" 4 | else if student.okayStuff 5 | if student.triedHard then "B" else "B-" 6 | else 7 | "C" 8 | 9 | square = (x) -> x * x 10 | 11 | two = -> 2 12 | 13 | math = 14 | root: Math.sqrt 15 | square: square 16 | cube: (x) -> x * square x 17 | 18 | race = (winner, runners...) -> 19 | print winner, runners 20 | 21 | class Animal extends Being 22 | constructor: (@name) -> 23 | 24 | move: (meters) -> 25 | alert @name + " moved #{meters}m." 26 | 27 | hi = `function() { 28 | return [document.title, "Hello JavaScript"].join(": "); 29 | }` 30 | 31 | heredoc = """ 32 | CoffeeScript subst test #{ 010 + 0xf / 0b10 + "nested string #{ /\n/ }"} 33 | """ 34 | 35 | ### 36 | CoffeeScript Compiler v1.2.0 37 | Released under the MIT License 38 | ### 39 | 40 | OPERATOR = /// ^ ( 41 | ?: [-=]> # function 42 | ) /// 43 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/cpp/default.txt: -------------------------------------------------------------------------------- 1 | #include 2 | #define IABS(x) ((x) < 0 ? -(x) : (x)) 3 | 4 | int main(int argc, char *argv[]) { 5 | 6 | /* An annoying "Hello World" example */ 7 | for (auto i = 0; i < 0xFFFF; i++) 8 | cout << "Hello, World!" << endl; 9 | 10 | char c = '\n'; 11 | unordered_map > m; 12 | m["key"] = "\\\\"; // this is an error 13 | 14 | return -2e3 + 12l; 15 | } 16 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/cs/default.txt: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | #pragma warning disable 414, 3021 4 | 5 | public class Program 6 | { 7 | /// The entry point to the program. 8 | public static int Main(string[] args) 9 | { 10 | Console.WriteLine("Hello, World!"); 11 | string s = @"This 12 | ""string"" 13 | spans 14 | multiple 15 | lines!"; 16 | 17 | dynamic x = new ExpandoObject(); 18 | x.MyProperty = 2; 19 | 20 | return 0; 21 | } 22 | } 23 | 24 | async Task AccessTheWebAsync() 25 | { 26 | // ... 27 | string urlContents = await getStringTask; 28 | return urlContents.Length; 29 | } 30 | 31 | internal static void ExceptionFilters() 32 | { 33 | try 34 | { 35 | throw new Exception(); 36 | } 37 | catch (Exception e) when (e.Message == "My error") { } 38 | } -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/css/default.txt: -------------------------------------------------------------------------------- 1 | @media screen and (-webkit-min-device-pixel-ratio: 0) { 2 | body:first-of-type pre::after { 3 | content: 'highlight: ' attr(class); 4 | } 5 | body { 6 | background: linear-gradient(45deg, blue, red); 7 | } 8 | } 9 | 10 | @import url('print.css'); 11 | @page:right { 12 | margin: 1cm 2cm 1.3cm 4cm; 13 | } 14 | 15 | @font-face { 16 | font-family: Chunkfive; src: url('Chunkfive.otf'); 17 | } 18 | 19 | div.text, 20 | #content, 21 | li[lang=ru] { 22 | font: Tahoma, Chunkfive, sans-serif; 23 | background: url('hatch.png') /* wtf? */; color: #F0F0F0 !important; 24 | width: 100%; 25 | } 26 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/css/rules-only.txt: -------------------------------------------------------------------------------- 1 | background-image: url(images/sample.png); 2 | background-color: red; 3 | background-blend-mode: multiply; 4 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/d/default.txt: -------------------------------------------------------------------------------- 1 | #!/usr/bin/rdmd 2 | // Computes average line length for standard input. 3 | import std.stdio; 4 | 5 | /+ 6 | this is a /+ nesting +/ comment 7 | +/ 8 | 9 | enum COMPILED_ON = __TIMESTAMP__; // special token 10 | 11 | enum character = '©'; 12 | enum copy_valid = '©'; 13 | enum backslash_escaped = '\\'; 14 | 15 | // string literals 16 | enum str = `hello "world"!`; 17 | enum multiline = r"lorem 18 | ipsum 19 | dolor"; // wysiwyg string, no escapes here allowed 20 | enum multiline2 = "sit 21 | amet 22 | \"adipiscing\" 23 | elit."; 24 | enum hex = x"66 6f 6f"; // same as "foo" 25 | 26 | #line 5 27 | 28 | // float literals 29 | enum f = [3.14f, .1, 1., 1e100, 0xc0de.01p+100]; 30 | 31 | static if (something == true) { 32 | import std.algorithm; 33 | } 34 | 35 | void main() pure nothrow @safe { 36 | ulong lines = 0; 37 | double sumLength = 0; 38 | foreach (line; stdin.byLine()) { 39 | ++lines; 40 | sumLength += line.length; 41 | } 42 | writeln("Average line length: ", 43 | lines ? sumLength / lines : 0); 44 | } 45 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/dart/default.txt: -------------------------------------------------------------------------------- 1 | library app; 2 | import 'dart:html'; 3 | 4 | part 'app2.dart'; 5 | 6 | /** 7 | * Class description and [link](http://dartlang.org/). 8 | */ 9 | @Awesome('it works!') 10 | class SomeClass extends BaseClass implements Comparable { 11 | factory SomeClass(num param); 12 | SomeClass._internal(int q) : super() { 13 | assert(q != 1); 14 | double z = 0.0; 15 | } 16 | 17 | /// **Sum** function 18 | int sum(int a, int b) => a + b; 19 | 20 | ElementList els() => querySelectorAll('.dart'); 21 | } 22 | 23 | String str = ' (${'parameter' + 'zxc'})'; 24 | String str = " (${true ? 2 + 2 / 2 : null})"; 25 | String str = r'\nraw\'; 26 | String str = r"\nraw\"; 27 | var str = ''' 28 | Something ${2+3} 29 | '''; 30 | var str = r""" 31 | Something ${2+3} 32 | """; 33 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/delphi/default.txt: -------------------------------------------------------------------------------- 1 | TList = Class(TObject) 2 | Private 3 | Some: String; 4 | Public 5 | Procedure Inside; // Suxx 6 | End;{TList} 7 | 8 | Procedure CopyFile(InFileName, var OutFileName: String); 9 | Const 10 | BufSize = 4096; (* Huh? *) 11 | Var 12 | InFile, OutFile: TStream; 13 | Buffer: Array[1..BufSize] Of Byte; 14 | ReadBufSize: Integer; 15 | Begin 16 | InFile := Nil; 17 | OutFile := Nil; 18 | Try 19 | InFile := TFileStream.Create(InFileName, fmOpenRead); 20 | OutFile := TFileStream.Create(OutFileName, fmCreate); 21 | Repeat 22 | ReadBufSize := InFile.Read(Buffer, BufSize); 23 | OutFile.Write(Buffer, ReadBufSize); 24 | Until ReadBufSize<>BufSize; 25 | Log('File ''' + InFileName + ''' copied'#13#10); 26 | Finally 27 | InFile.Free; 28 | OutFile.Free; 29 | End;{Try} 30 | End;{CopyFile} 31 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/diff/default.txt: -------------------------------------------------------------------------------- 1 | Index: languages/ini.js 2 | =================================================================== 3 | --- languages/ini.js (revision 199) 4 | +++ languages/ini.js (revision 200) 5 | @@ -1,8 +1,7 @@ 6 | hljs.LANGUAGES.ini = 7 | { 8 | case_insensitive: true, 9 | - defaultMode: 10 | - { 11 | + defaultMode: { 12 | contains: ['comment', 'title', 'setting'], 13 | illegal: '[^\\s]' 14 | }, 15 | 16 | *** /path/to/original timestamp 17 | --- /path/to/new timestamp 18 | *************** 19 | *** 1,3 **** 20 | --- 1,9 ---- 21 | + This is an important 22 | + notice! It should 23 | + therefore be located at 24 | + the beginning of this 25 | + document! 26 | 27 | ! compress the size of the 28 | ! changes. 29 | 30 | It is important to spell 31 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/django/default.txt: -------------------------------------------------------------------------------- 1 | {% if articles|length %} 2 | {% for article in articles %} 3 | 4 | {# Striped table #} 5 | 6 | {{ article|default:"Hi... "|escape }} 7 | {{ article.date|date:'d.m.Y' }} 8 | 9 | 10 | {% endfor %} 11 | {% endif %} 12 | 13 | {% comment %} 14 | Comments may be long and multiline. 15 | Markup is not highlighted within comments. 16 | {% endcomment %} 17 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/dockerfile/default.txt: -------------------------------------------------------------------------------- 1 | # Example instructions from https://docs.docker.com/reference/builder/ 2 | FROM ubuntu:14.04 3 | 4 | MAINTAINER example@example.com 5 | 6 | ENV foo /bar 7 | WORKDIR ${foo} # WORKDIR /bar 8 | ADD . $foo # ADD . /bar 9 | COPY \$foo /quux # COPY $foo /quux 10 | 11 | RUN apt-get update && apt-get install -y software-properties-common\ 12 | zsh curl wget git htop\ 13 | unzip vim telnet 14 | RUN ["/bin/bash", "-c", "echo hello ${USER}"] 15 | 16 | CMD ["executable","param1","param2"] 17 | CMD command param1 param2 18 | 19 | EXPOSE 1337 20 | 21 | ENV myName="John Doe" myDog=Rex\ The\ Dog \ 22 | myCat=fluffy 23 | 24 | ENV myName John Doe 25 | ENV myDog Rex The Dog 26 | ENV myCat fluffy 27 | 28 | ADD hom* /mydir/ # adds all files starting with "hom" 29 | ADD hom?.txt /mydir/ # ? is replaced with any single character 30 | 31 | COPY hom* /mydir/ # adds all files starting with "hom" 32 | COPY hom?.txt /mydir/ # ? is replaced with any single character 33 | 34 | ENTRYPOINT ["executable", "param1", "param2"] 35 | ENTRYPOINT command param1 param2 36 | 37 | VOLUME ["/data"] 38 | 39 | USER daemon 40 | 41 | WORKDIR /path/to/workdir 42 | 43 | ONBUILD ADD . /app/src 44 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/dos/default.txt: -------------------------------------------------------------------------------- 1 | cd \ 2 | copy a b 3 | ping 192.168.0.1 4 | @rem ping 192.168.0.1 5 | net stop sharedaccess 6 | del %tmp% /f /s /q 7 | del %temp% /f /s /q 8 | ipconfig /flushdns 9 | taskkill /F /IM JAVA.EXE /T 10 | 11 | cd Photoshop/Adobe Photoshop CS3/AMT/ 12 | if exist application.sif ( 13 | ren application.sif _application.sif 14 | ) else ( 15 | ren _application.sif application.sif 16 | ) 17 | 18 | taskkill /F /IM proquota.exe /T 19 | 20 | sfc /SCANNOW 21 | 22 | set path = test 23 | 24 | xcopy %1\*.* %2 25 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/dust/default.txt: -------------------------------------------------------------------------------- 1 |

Hours

2 | 3 |
    4 | {#users} 5 |
  • {firstName}
  • {~n} 6 | {/users} 7 |
8 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/elixir/default.txt: -------------------------------------------------------------------------------- 1 | defrecord Person, first_name: nil, last_name: "Dudington" do 2 | def name record do # huh ? 3 | "#{record.first_name} #{record.last_name}" 4 | end 5 | end 6 | 7 | defrecord User, name: "José", age: 25 8 | 9 | guy = Person.new first_name: "Guy" 10 | guy.name 11 | 12 | defmodule ListServer do 13 | @moduledoc """ 14 | This module provides an easy to use ListServer, useful for keeping 15 | lists of things. 16 | """ 17 | use GenServer.Behaviour 18 | alias Foo.Bar 19 | 20 | ### Public API 21 | @doc """ 22 | Starts and links a new ListServer, returning {:ok, pid} 23 | 24 | ## Example 25 | 26 | iex> {:ok, pid} = ListServer.start_link 27 | 28 | """ 29 | def start_link do 30 | :gen_server.start_link({:local, :list}, __MODULE__, [], []) 31 | end 32 | 33 | ### GenServer API 34 | def init(list) do 35 | {:ok, list} 36 | end 37 | 38 | # Clear the list 39 | def handle_cast :clear, list do 40 | {:noreply, []} 41 | end 42 | end 43 | 44 | {:ok, pid} = ListServer.start_link 45 | pid <- {:foo, "bar"} 46 | 47 | greeter = fn(x) -> IO.puts "hey #{x}" end 48 | greeter.("Bob") 49 | 50 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/elm/default.txt: -------------------------------------------------------------------------------- 1 | module Examples.Hello (main, Point, Tree(..)) where 2 | 3 | import Html exposing (Html, span, text) 4 | import Html.Attributes exposing (..) 5 | import Time 6 | 7 | main : Html 8 | main = 9 | span [class "welcome-message"] [text "Hello, World!"] 10 | 11 | type alias Point = { x : Int, y : Int } 12 | 13 | type Tree a = Leaf a | Node (Tree a) a (Tree a) 14 | 15 | flatten : Tree a -> List a 16 | flatten t = 17 | case t of 18 | Leaf a -> [a] 19 | Node l a r -> flatten l ++ a :: flatten r 20 | 21 | -- outgoing values 22 | port time : Signal Float 23 | port time = Time.every 1000 24 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/erb/default.txt: -------------------------------------------------------------------------------- 1 | <%# this is a comment %> 2 | 3 | <% @posts.each do |post| %> 4 |

<%= link_to post.title, post %>

5 | <% end %> 6 | 7 | <%- available_things = things.select(&:available?) -%> 8 | <%%- x = 1 + 2 -%%> 9 | <%% value = 'real string #{@value}' %%> 10 | <%%= available_things.inspect %%> 11 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/erlang-repl/default.txt: -------------------------------------------------------------------------------- 1 | 1> Str = "abcd". 2 | "abcd" 3 | 2> L = test:length(Str). 4 | 4 5 | 3> Descriptor = {L, list_to_atom(Str)}. 6 | {4,abcd} 7 | 4> L. 8 | 4 9 | 5> b(). 10 | Descriptor = {4,abcd} 11 | L = 4 12 | Str = "abcd" 13 | ok 14 | 6> f(L). 15 | ok 16 | 7> b(). 17 | Descriptor = {4,abcd} 18 | Str = "abcd" 19 | ok 20 | 8> {L, _} = Descriptor. 21 | {4,abcd} 22 | 9> L. 23 | 4 24 | 10> 2#101. 25 | 5 26 | 11> 1.85e+3. 27 | 1850 28 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/fix/default.txt: -------------------------------------------------------------------------------- 1 | 8=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␁ 2 | 3 | 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 4 |  -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/fortran/default.txt: -------------------------------------------------------------------------------- 1 | subroutine test_sub(k) 2 | implicit none 3 | 4 | !=============================== 5 | ! This is a test subroutine 6 | !=============================== 7 | 8 | integer, intent(in) :: k 9 | double precision, allocatable :: a(:) 10 | integer, parameter :: nmax=10 11 | integer :: i 12 | 13 | allocate (a(nmax)) 14 | 15 | do i=1,nmax 16 | a(i) = dble(i)*5.d0 17 | enddo 18 | 19 | print *, 'Hello world' 20 | write (*,*) a(:) 21 | 22 | end subroutine test_sub 23 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/fsharp/default.txt: -------------------------------------------------------------------------------- 1 | open System 2 | 3 | // Single line comment... 4 | (* 5 | This is a 6 | multiline comment. 7 | *) 8 | let checkList alist = 9 | match alist with 10 | | [] -> 0 11 | | [a] -> 1 12 | | [a; b] -> 2 13 | | [a; b; c] -> 3 14 | | _ -> failwith "List is too big!" 15 | 16 | 17 | let text = "Some text..." 18 | let text2 = @"A ""verbatim"" string..." 19 | let catalog = """ 20 | Some "long" string... 21 | """ 22 | 23 | let rec fib x = if x <= 2 then 1 else fib(x-1) + fib(x-2) 24 | 25 | let fibs = 26 | Async.Parallel [ for i in 0..40 -> async { return fib(i) } ] 27 | |> Async.RunSynchronously 28 | 29 | type Sprocket(gears) = 30 | member this.Gears : int = gears 31 | 32 | [] 33 | type Animal = 34 | abstract Speak : unit -> unit 35 | 36 | type Widget = 37 | | RedWidget 38 | | GreenWidget 39 | 40 | type Point = {X: float; Y: float;} 41 | 42 | [] 43 | type s 44 | let minutte = 60 45 | 46 | type DefaultMailbox<'a>() = 47 | let mutable inbox = ConcurrentQueue<'a>() 48 | let awaitMsg = new AutoResetEvent(false) 49 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/gams/default.txt: -------------------------------------------------------------------------------- 1 | SETS 2 | I canning plants / SEATTLE, SAN-DIEGO / 3 | J markets / NEW-YORK, CHICAGO, TOPEKA / ; 4 | PARAMETERS 5 | A(I) capacity of plant i in cases 6 | / SEATTLE 350 7 | SAN-DIEGO 600 / 8 | B(J) demand at market j in cases 9 | / NEW-YORK 325 10 | CHICAGO 300 11 | TOPEKA 275 / ; 12 | TABLE D(I,J) distance in thousands of miles 13 | NEW-YORK CHICAGO TOPEKA 14 | SEATTLE 2.5 1.7 1.8 15 | SAN-DIEGO 2.5 1.8 1.4 ; 16 | SCALAR F freight in dollars per case per thousand miles /90/ ; 17 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/gcode/default.txt: -------------------------------------------------------------------------------- 1 | O003 (DIAMOND SQUARE) 2 | N2 G54 G90 G49 G80 3 | N3 M6 T1 (1.ENDMILL) 4 | N4 M3 S1800 5 | N5 G0 X-.6 Y2.050 6 | N6 G43 H1 Z.1 7 | N7 G1 Z-.3 F50. 8 | N8 G41 D1 Y1.45 9 | N9 G1 X0 F20. 10 | N10 G2 J-1.45 11 | (CUTTER COMP CANCEL) 12 | N11 G1 Z-.2 F50. 13 | N12 Y-.990 14 | N13 G40 15 | N14 G0 X-.6 Y1.590 16 | N15 G0 Z.1 17 | N16 M5 G49 G28 G91 Z0 18 | N17 CALL O9456 19 | N18 #500=0.004 20 | N19 #503=[#500+#501] 21 | N20 VC45=0.0006 22 | VS4=0.0007 23 | N21 G90 G10 L20 P3 X5.Y4. Z6.567 24 | N22 G0 X5000 25 | N23 IF [#1 LT 0.370] GOTO 49 26 | N24 X-0.678 Y+.990 27 | N25 G84.3 X-0.1 28 | N26 #4=#5*COS[45] 29 | N27 #4=#5*SIN[45] 30 | N28 VZOFZ=652.9658 31 | % 32 | -------------------------------------------------------------------------------- /docs/highlightJs/test/detect/gherkin/default.txt: -------------------------------------------------------------------------------- 1 | # language: en 2 | Feature: Addition 3 | In order to avoid silly mistakes 4 | As a math idiot 5 | I want to be told the sum of two numbers 6 | 7 | @this_is_a_tag 8 | Scenario Outline: Add two numbers 9 | * I have a calculator 10 | Given I have entered into the calculator 11 | And I have entered into the calculator 12 | When I press