gitlab-pygments.rb 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +2 -0
- data/README.md +91 -0
- data/Rakefile +78 -0
- data/bench.rb +22 -0
- data/cache-lexers.rb +8 -0
- data/lexers +0 -0
- data/lib/pygments/lexer.rb +148 -0
- data/lib/pygments/mentos.py +344 -0
- data/lib/pygments/popen.rb +389 -0
- data/lib/pygments/version.rb +3 -0
- data/lib/pygments.rb +8 -0
- data/pygments.rb.gemspec +24 -0
- data/test/test_data.c +2581 -0
- data/test/test_data.py +514 -0
- data/test/test_data_generated +2582 -0
- data/test/test_pygments.rb +276 -0
- data/vendor/custom_formatters/gitlab.py +171 -0
- data/vendor/custom_lexers/github.py +362 -0
- data/vendor/pygments-main/AUTHORS +115 -0
- data/vendor/pygments-main/CHANGES +762 -0
- data/vendor/pygments-main/LICENSE +25 -0
- data/vendor/pygments-main/MANIFEST.in +6 -0
- data/vendor/pygments-main/Makefile +59 -0
- data/vendor/pygments-main/REVISION +1 -0
- data/vendor/pygments-main/TODO +15 -0
- data/vendor/pygments-main/docs/generate.py +472 -0
- data/vendor/pygments-main/docs/pygmentize.1 +94 -0
- data/vendor/pygments-main/docs/src/api.txt +270 -0
- data/vendor/pygments-main/docs/src/authors.txt +5 -0
- data/vendor/pygments-main/docs/src/changelog.txt +5 -0
- data/vendor/pygments-main/docs/src/cmdline.txt +147 -0
- data/vendor/pygments-main/docs/src/filterdevelopment.txt +70 -0
- data/vendor/pygments-main/docs/src/filters.txt +42 -0
- data/vendor/pygments-main/docs/src/formatterdevelopment.txt +169 -0
- data/vendor/pygments-main/docs/src/formatters.txt +48 -0
- data/vendor/pygments-main/docs/src/index.txt +69 -0
- data/vendor/pygments-main/docs/src/installation.txt +71 -0
- data/vendor/pygments-main/docs/src/integrate.txt +43 -0
- data/vendor/pygments-main/docs/src/lexerdevelopment.txt +551 -0
- data/vendor/pygments-main/docs/src/lexers.txt +67 -0
- data/vendor/pygments-main/docs/src/moinmoin.txt +39 -0
- data/vendor/pygments-main/docs/src/plugins.txt +93 -0
- data/vendor/pygments-main/docs/src/quickstart.txt +202 -0
- data/vendor/pygments-main/docs/src/rstdirective.txt +22 -0
- data/vendor/pygments-main/docs/src/styles.txt +143 -0
- data/vendor/pygments-main/docs/src/tokens.txt +349 -0
- data/vendor/pygments-main/docs/src/unicode.txt +49 -0
- data/vendor/pygments-main/external/markdown-processor.py +67 -0
- data/vendor/pygments-main/external/moin-parser.py +112 -0
- data/vendor/pygments-main/external/pygments.bashcomp +38 -0
- data/vendor/pygments-main/external/rst-directive-old.py +77 -0
- data/vendor/pygments-main/external/rst-directive.py +83 -0
- data/vendor/pygments-main/ez_setup.py +276 -0
- data/vendor/pygments-main/pygmentize +7 -0
- data/vendor/pygments-main/pygments/__init__.py +91 -0
- data/vendor/pygments-main/pygments/cmdline.py +433 -0
- data/vendor/pygments-main/pygments/console.py +74 -0
- data/vendor/pygments-main/pygments/filter.py +74 -0
- data/vendor/pygments-main/pygments/filters/__init__.py +357 -0
- data/vendor/pygments-main/pygments/formatter.py +92 -0
- data/vendor/pygments-main/pygments/formatters/__init__.py +68 -0
- data/vendor/pygments-main/pygments/formatters/_mapping.py +94 -0
- data/vendor/pygments-main/pygments/formatters/bbcode.py +109 -0
- data/vendor/pygments-main/pygments/formatters/gitlab.py +171 -0
- data/vendor/pygments-main/pygments/formatters/html.py +750 -0
- data/vendor/pygments-main/pygments/formatters/img.py +553 -0
- data/vendor/pygments-main/pygments/formatters/latex.py +378 -0
- data/vendor/pygments-main/pygments/formatters/other.py +117 -0
- data/vendor/pygments-main/pygments/formatters/rtf.py +136 -0
- data/vendor/pygments-main/pygments/formatters/svg.py +154 -0
- data/vendor/pygments-main/pygments/formatters/terminal.py +112 -0
- data/vendor/pygments-main/pygments/formatters/terminal256.py +222 -0
- data/vendor/pygments-main/pygments/lexer.py +697 -0
- data/vendor/pygments-main/pygments/lexers/__init__.py +229 -0
- data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1645 -0
- data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +232 -0
- data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +249 -0
- data/vendor/pygments-main/pygments/lexers/_mapping.py +298 -0
- data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +3787 -0
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +232 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +29 -0
- data/vendor/pygments-main/pygments/lexers/_vimbuiltins.py +3 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1803 -0
- data/vendor/pygments-main/pygments/lexers/asm.py +360 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +2891 -0
- data/vendor/pygments-main/pygments/lexers/dotnet.py +636 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1832 -0
- data/vendor/pygments-main/pygments/lexers/github.py +362 -0
- data/vendor/pygments-main/pygments/lexers/hdl.py +356 -0
- data/vendor/pygments-main/pygments/lexers/jvm.py +847 -0
- data/vendor/pygments-main/pygments/lexers/math.py +1072 -0
- data/vendor/pygments-main/pygments/lexers/other.py +3339 -0
- data/vendor/pygments-main/pygments/lexers/parsers.py +695 -0
- data/vendor/pygments-main/pygments/lexers/shell.py +361 -0
- data/vendor/pygments-main/pygments/lexers/special.py +100 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +559 -0
- data/vendor/pygments-main/pygments/lexers/templates.py +1631 -0
- data/vendor/pygments-main/pygments/lexers/text.py +1753 -0
- data/vendor/pygments-main/pygments/lexers/web.py +2864 -0
- data/vendor/pygments-main/pygments/plugin.py +74 -0
- data/vendor/pygments-main/pygments/scanner.py +104 -0
- data/vendor/pygments-main/pygments/style.py +117 -0
- data/vendor/pygments-main/pygments/styles/__init__.py +70 -0
- data/vendor/pygments-main/pygments/styles/autumn.py +65 -0
- data/vendor/pygments-main/pygments/styles/borland.py +51 -0
- data/vendor/pygments-main/pygments/styles/bw.py +49 -0
- data/vendor/pygments-main/pygments/styles/colorful.py +81 -0
- data/vendor/pygments-main/pygments/styles/default.py +73 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +72 -0
- data/vendor/pygments-main/pygments/styles/friendly.py +72 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +42 -0
- data/vendor/pygments-main/pygments/styles/manni.py +75 -0
- data/vendor/pygments-main/pygments/styles/monokai.py +106 -0
- data/vendor/pygments-main/pygments/styles/murphy.py +80 -0
- data/vendor/pygments-main/pygments/styles/native.py +65 -0
- data/vendor/pygments-main/pygments/styles/pastie.py +75 -0
- data/vendor/pygments-main/pygments/styles/perldoc.py +69 -0
- data/vendor/pygments-main/pygments/styles/rrt.py +33 -0
- data/vendor/pygments-main/pygments/styles/tango.py +141 -0
- data/vendor/pygments-main/pygments/styles/trac.py +63 -0
- data/vendor/pygments-main/pygments/styles/vim.py +63 -0
- data/vendor/pygments-main/pygments/styles/vs.py +38 -0
- data/vendor/pygments-main/pygments/token.py +195 -0
- data/vendor/pygments-main/pygments/unistring.py +130 -0
- data/vendor/pygments-main/pygments/util.py +232 -0
- data/vendor/pygments-main/scripts/check_sources.py +242 -0
- data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +30 -0
- data/vendor/pygments-main/scripts/epydoc.css +280 -0
- data/vendor/pygments-main/scripts/find_codetags.py +205 -0
- data/vendor/pygments-main/scripts/find_error.py +171 -0
- data/vendor/pygments-main/scripts/get_vimkw.py +43 -0
- data/vendor/pygments-main/scripts/pylintrc +301 -0
- data/vendor/pygments-main/scripts/reindent.py +291 -0
- data/vendor/pygments-main/scripts/vim2pygments.py +933 -0
- data/vendor/pygments-main/setup.cfg +6 -0
- data/vendor/pygments-main/setup.py +88 -0
- data/vendor/pygments-main/tests/dtds/HTML4-f.dtd +37 -0
- data/vendor/pygments-main/tests/dtds/HTML4-s.dtd +869 -0
- data/vendor/pygments-main/tests/dtds/HTML4.dcl +88 -0
- data/vendor/pygments-main/tests/dtds/HTML4.dtd +1092 -0
- data/vendor/pygments-main/tests/dtds/HTML4.soc +9 -0
- data/vendor/pygments-main/tests/dtds/HTMLlat1.ent +195 -0
- data/vendor/pygments-main/tests/dtds/HTMLspec.ent +77 -0
- data/vendor/pygments-main/tests/dtds/HTMLsym.ent +241 -0
- data/vendor/pygments-main/tests/examplefiles/ANTLRv3.g +608 -0
- data/vendor/pygments-main/tests/examplefiles/AcidStateAdvanced.hs +209 -0
- data/vendor/pygments-main/tests/examplefiles/AlternatingGroup.mu +102 -0
- data/vendor/pygments-main/tests/examplefiles/CPDictionary.j +611 -0
- data/vendor/pygments-main/tests/examplefiles/Constants.mo +158 -0
- data/vendor/pygments-main/tests/examplefiles/DancingSudoku.lhs +411 -0
- data/vendor/pygments-main/tests/examplefiles/Errors.scala +18 -0
- data/vendor/pygments-main/tests/examplefiles/File.hy +174 -0
- data/vendor/pygments-main/tests/examplefiles/Intro.java +1660 -0
- data/vendor/pygments-main/tests/examplefiles/Makefile +1131 -0
- data/vendor/pygments-main/tests/examplefiles/Object.st +4394 -0
- data/vendor/pygments-main/tests/examplefiles/OrderedMap.hx +584 -0
- data/vendor/pygments-main/tests/examplefiles/SmallCheck.hs +378 -0
- data/vendor/pygments-main/tests/examplefiles/Sorting.mod +470 -0
- data/vendor/pygments-main/tests/examplefiles/Sudoku.lhs +382 -0
- data/vendor/pygments-main/tests/examplefiles/addressbook.proto +30 -0
- data/vendor/pygments-main/tests/examplefiles/antlr_throws +1 -0
- data/vendor/pygments-main/tests/examplefiles/apache2.conf +393 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test.as +143 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test2.as +46 -0
- data/vendor/pygments-main/tests/examplefiles/as3_test3.as +3 -0
- data/vendor/pygments-main/tests/examplefiles/aspx-cs_example +27 -0
- data/vendor/pygments-main/tests/examplefiles/badcase.java +2 -0
- data/vendor/pygments-main/tests/examplefiles/batchfile.bat +49 -0
- data/vendor/pygments-main/tests/examplefiles/boot-9.scm +1557 -0
- data/vendor/pygments-main/tests/examplefiles/cells.ps +515 -0
- data/vendor/pygments-main/tests/examplefiles/ceval.c +2604 -0
- data/vendor/pygments-main/tests/examplefiles/cheetah_example.html +13 -0
- data/vendor/pygments-main/tests/examplefiles/classes.dylan +40 -0
- data/vendor/pygments-main/tests/examplefiles/condensed_ruby.rb +10 -0
- data/vendor/pygments-main/tests/examplefiles/coq_RelationClasses +447 -0
- data/vendor/pygments-main/tests/examplefiles/database.pytb +20 -0
- data/vendor/pygments-main/tests/examplefiles/de.MoinMoin.po +2461 -0
- data/vendor/pygments-main/tests/examplefiles/demo.ahk +181 -0
- data/vendor/pygments-main/tests/examplefiles/demo.cfm +38 -0
- data/vendor/pygments-main/tests/examplefiles/django_sample.html+django +68 -0
- data/vendor/pygments-main/tests/examplefiles/dwarf.cw +17 -0
- data/vendor/pygments-main/tests/examplefiles/erl_session +10 -0
- data/vendor/pygments-main/tests/examplefiles/escape_semicolon.clj +1 -0
- data/vendor/pygments-main/tests/examplefiles/evil_regex.js +48 -0
- data/vendor/pygments-main/tests/examplefiles/example.c +2080 -0
- data/vendor/pygments-main/tests/examplefiles/example.cls +15 -0
- data/vendor/pygments-main/tests/examplefiles/example.cpp +2363 -0
- data/vendor/pygments-main/tests/examplefiles/example.gs +106 -0
- data/vendor/pygments-main/tests/examplefiles/example.gst +7 -0
- data/vendor/pygments-main/tests/examplefiles/example.kt +47 -0
- data/vendor/pygments-main/tests/examplefiles/example.lua +250 -0
- data/vendor/pygments-main/tests/examplefiles/example.moo +26 -0
- data/vendor/pygments-main/tests/examplefiles/example.moon +629 -0
- data/vendor/pygments-main/tests/examplefiles/example.nim +1010 -0
- data/vendor/pygments-main/tests/examplefiles/example.ns2 +69 -0
- data/vendor/pygments-main/tests/examplefiles/example.p +34 -0
- data/vendor/pygments-main/tests/examplefiles/example.pas +2708 -0
- data/vendor/pygments-main/tests/examplefiles/example.rb +1852 -0
- data/vendor/pygments-main/tests/examplefiles/example.rhtml +561 -0
- data/vendor/pygments-main/tests/examplefiles/example.sh-session +19 -0
- data/vendor/pygments-main/tests/examplefiles/example.sml +156 -0
- data/vendor/pygments-main/tests/examplefiles/example.snobol +15 -0
- data/vendor/pygments-main/tests/examplefiles/example.tea +34 -0
- data/vendor/pygments-main/tests/examplefiles/example.u +548 -0
- data/vendor/pygments-main/tests/examplefiles/example.weechatlog +9 -0
- data/vendor/pygments-main/tests/examplefiles/example.xhtml +376 -0
- data/vendor/pygments-main/tests/examplefiles/example.yaml +302 -0
- data/vendor/pygments-main/tests/examplefiles/example2.aspx +29 -0
- data/vendor/pygments-main/tests/examplefiles/example_elixir.ex +363 -0
- data/vendor/pygments-main/tests/examplefiles/example_file.fy +128 -0
- data/vendor/pygments-main/tests/examplefiles/firefox.mak +586 -0
- data/vendor/pygments-main/tests/examplefiles/flipflop.sv +19 -0
- data/vendor/pygments-main/tests/examplefiles/foo.sce +6 -0
- data/vendor/pygments-main/tests/examplefiles/format.ml +1213 -0
- data/vendor/pygments-main/tests/examplefiles/fucked_up.rb +77 -0
- data/vendor/pygments-main/tests/examplefiles/function.mu +1 -0
- data/vendor/pygments-main/tests/examplefiles/functional.rst +1472 -0
- data/vendor/pygments-main/tests/examplefiles/genclass.clj +510 -0
- data/vendor/pygments-main/tests/examplefiles/genshi_example.xml+genshi +193 -0
- data/vendor/pygments-main/tests/examplefiles/genshitext_example.genshitext +33 -0
- data/vendor/pygments-main/tests/examplefiles/glsl.frag +7 -0
- data/vendor/pygments-main/tests/examplefiles/glsl.vert +13 -0
- data/vendor/pygments-main/tests/examplefiles/html+php_faulty.php +1 -0
- data/vendor/pygments-main/tests/examplefiles/http_request_example +14 -0
- data/vendor/pygments-main/tests/examplefiles/http_response_example +27 -0
- data/vendor/pygments-main/tests/examplefiles/import.hs +4 -0
- data/vendor/pygments-main/tests/examplefiles/intro.ik +24 -0
- data/vendor/pygments-main/tests/examplefiles/ints.php +10 -0
- data/vendor/pygments-main/tests/examplefiles/intsyn.fun +675 -0
- data/vendor/pygments-main/tests/examplefiles/intsyn.sig +286 -0
- data/vendor/pygments-main/tests/examplefiles/irb_heredoc +8 -0
- data/vendor/pygments-main/tests/examplefiles/irc.lsp +214 -0
- data/vendor/pygments-main/tests/examplefiles/java.properties +16 -0
- data/vendor/pygments-main/tests/examplefiles/jbst_example1.jbst +28 -0
- data/vendor/pygments-main/tests/examplefiles/jbst_example2.jbst +45 -0
- data/vendor/pygments-main/tests/examplefiles/jinjadesignerdoc.rst +713 -0
- data/vendor/pygments-main/tests/examplefiles/lighttpd_config.conf +13 -0
- data/vendor/pygments-main/tests/examplefiles/linecontinuation.py +47 -0
- data/vendor/pygments-main/tests/examplefiles/ltmain.sh +2849 -0
- data/vendor/pygments-main/tests/examplefiles/main.cmake +42 -0
- data/vendor/pygments-main/tests/examplefiles/markdown.lsp +679 -0
- data/vendor/pygments-main/tests/examplefiles/matlab_noreturn +3 -0
- data/vendor/pygments-main/tests/examplefiles/matlab_sample +27 -0
- data/vendor/pygments-main/tests/examplefiles/matlabsession_sample.txt +37 -0
- data/vendor/pygments-main/tests/examplefiles/minimal.ns2 +4 -0
- data/vendor/pygments-main/tests/examplefiles/moin_SyntaxReference.txt +340 -0
- data/vendor/pygments-main/tests/examplefiles/multiline_regexes.rb +38 -0
- data/vendor/pygments-main/tests/examplefiles/nasm_aoutso.asm +96 -0
- data/vendor/pygments-main/tests/examplefiles/nasm_objexe.asm +30 -0
- data/vendor/pygments-main/tests/examplefiles/nemerle_sample.n +87 -0
- data/vendor/pygments-main/tests/examplefiles/nginx_nginx.conf +118 -0
- data/vendor/pygments-main/tests/examplefiles/numbers.c +12 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example.m +25 -0
- data/vendor/pygments-main/tests/examplefiles/objc_example2.m +24 -0
- data/vendor/pygments-main/tests/examplefiles/perl_misc +62 -0
- data/vendor/pygments-main/tests/examplefiles/perl_perl5db +998 -0
- data/vendor/pygments-main/tests/examplefiles/perl_regex-delims +120 -0
- data/vendor/pygments-main/tests/examplefiles/perlfunc.1 +856 -0
- data/vendor/pygments-main/tests/examplefiles/phpcomplete.vim +567 -0
- data/vendor/pygments-main/tests/examplefiles/pleac.in.rb +1223 -0
- data/vendor/pygments-main/tests/examplefiles/postgresql_test.txt +47 -0
- data/vendor/pygments-main/tests/examplefiles/pppoe.applescript +10 -0
- data/vendor/pygments-main/tests/examplefiles/psql_session.txt +122 -0
- data/vendor/pygments-main/tests/examplefiles/py3_test.txt +2 -0
- data/vendor/pygments-main/tests/examplefiles/pycon_test.pycon +14 -0
- data/vendor/pygments-main/tests/examplefiles/pytb_test2.pytb +2 -0
- data/vendor/pygments-main/tests/examplefiles/python25-bsd.mak +234 -0
- data/vendor/pygments-main/tests/examplefiles/qsort.prolog +13 -0
- data/vendor/pygments-main/tests/examplefiles/r-console-transcript.Rout +38 -0
- data/vendor/pygments-main/tests/examplefiles/ragel-cpp_rlscan +280 -0
- data/vendor/pygments-main/tests/examplefiles/ragel-cpp_snippet +2 -0
- data/vendor/pygments-main/tests/examplefiles/regex.js +22 -0
- data/vendor/pygments-main/tests/examplefiles/reversi.lsp +427 -0
- data/vendor/pygments-main/tests/examplefiles/ruby_func_def.rb +11 -0
- data/vendor/pygments-main/tests/examplefiles/scilab.sci +30 -0
- data/vendor/pygments-main/tests/examplefiles/sibling.prolog +19 -0
- data/vendor/pygments-main/tests/examplefiles/simple.md +747 -0
- data/vendor/pygments-main/tests/examplefiles/smarty_example.html +209 -0
- data/vendor/pygments-main/tests/examplefiles/source.lgt +343 -0
- data/vendor/pygments-main/tests/examplefiles/sources.list +62 -0
- data/vendor/pygments-main/tests/examplefiles/sphere.pov +18 -0
- data/vendor/pygments-main/tests/examplefiles/sqlite3.sqlite3-console +27 -0
- data/vendor/pygments-main/tests/examplefiles/squid.conf +30 -0
- data/vendor/pygments-main/tests/examplefiles/string.jl +1031 -0
- data/vendor/pygments-main/tests/examplefiles/string_delimiters.d +21 -0
- data/vendor/pygments-main/tests/examplefiles/stripheredoc.sh +3 -0
- data/vendor/pygments-main/tests/examplefiles/test.R +119 -0
- data/vendor/pygments-main/tests/examplefiles/test.adb +211 -0
- data/vendor/pygments-main/tests/examplefiles/test.asy +131 -0
- data/vendor/pygments-main/tests/examplefiles/test.awk +121 -0
- data/vendor/pygments-main/tests/examplefiles/test.bas +29 -0
- data/vendor/pygments-main/tests/examplefiles/test.bmx +145 -0
- data/vendor/pygments-main/tests/examplefiles/test.boo +39 -0
- data/vendor/pygments-main/tests/examplefiles/test.bro +250 -0
- data/vendor/pygments-main/tests/examplefiles/test.cs +374 -0
- data/vendor/pygments-main/tests/examplefiles/test.css +54 -0
- data/vendor/pygments-main/tests/examplefiles/test.d +135 -0
- data/vendor/pygments-main/tests/examplefiles/test.dart +23 -0
- data/vendor/pygments-main/tests/examplefiles/test.dtd +89 -0
- data/vendor/pygments-main/tests/examplefiles/test.ec +605 -0
- data/vendor/pygments-main/tests/examplefiles/test.ecl +58 -0
- data/vendor/pygments-main/tests/examplefiles/test.eh +315 -0
- data/vendor/pygments-main/tests/examplefiles/test.erl +169 -0
- data/vendor/pygments-main/tests/examplefiles/test.evoque +33 -0
- data/vendor/pygments-main/tests/examplefiles/test.fan +818 -0
- data/vendor/pygments-main/tests/examplefiles/test.flx +57 -0
- data/vendor/pygments-main/tests/examplefiles/test.gdc +13 -0
- data/vendor/pygments-main/tests/examplefiles/test.groovy +97 -0
- data/vendor/pygments-main/tests/examplefiles/test.html +339 -0
- data/vendor/pygments-main/tests/examplefiles/test.ini +10 -0
- data/vendor/pygments-main/tests/examplefiles/test.java +653 -0
- data/vendor/pygments-main/tests/examplefiles/test.jsp +24 -0
- data/vendor/pygments-main/tests/examplefiles/test.maql +45 -0
- data/vendor/pygments-main/tests/examplefiles/test.mod +374 -0
- data/vendor/pygments-main/tests/examplefiles/test.moo +51 -0
- data/vendor/pygments-main/tests/examplefiles/test.myt +166 -0
- data/vendor/pygments-main/tests/examplefiles/test.nim +93 -0
- data/vendor/pygments-main/tests/examplefiles/test.pas +743 -0
- data/vendor/pygments-main/tests/examplefiles/test.php +505 -0
- data/vendor/pygments-main/tests/examplefiles/test.plot +333 -0
- data/vendor/pygments-main/tests/examplefiles/test.ps1 +108 -0
- data/vendor/pygments-main/tests/examplefiles/test.pypylog +1839 -0
- data/vendor/pygments-main/tests/examplefiles/test.r3 +94 -0
- data/vendor/pygments-main/tests/examplefiles/test.rb +177 -0
- data/vendor/pygments-main/tests/examplefiles/test.rhtml +43 -0
- data/vendor/pygments-main/tests/examplefiles/test.scaml +8 -0
- data/vendor/pygments-main/tests/examplefiles/test.ssp +12 -0
- data/vendor/pygments-main/tests/examplefiles/test.tcsh +830 -0
- data/vendor/pygments-main/tests/examplefiles/test.vb +407 -0
- data/vendor/pygments-main/tests/examplefiles/test.vhdl +161 -0
- data/vendor/pygments-main/tests/examplefiles/test.xqy +138 -0
- data/vendor/pygments-main/tests/examplefiles/test.xsl +23 -0
- data/vendor/pygments-main/tests/examplefiles/truncated.pytb +15 -0
- data/vendor/pygments-main/tests/examplefiles/type.lisp +1202 -0
- data/vendor/pygments-main/tests/examplefiles/underscore.coffee +603 -0
- data/vendor/pygments-main/tests/examplefiles/unicode.applescript +5 -0
- data/vendor/pygments-main/tests/examplefiles/unicodedoc.py +11 -0
- data/vendor/pygments-main/tests/examplefiles/webkit-transition.css +3 -0
- data/vendor/pygments-main/tests/examplefiles/while.pov +13 -0
- data/vendor/pygments-main/tests/examplefiles/wiki.factor +384 -0
- data/vendor/pygments-main/tests/examplefiles/xml_example +1897 -0
- data/vendor/pygments-main/tests/examplefiles/zmlrpc.f90 +798 -0
- data/vendor/pygments-main/tests/old_run.py +138 -0
- data/vendor/pygments-main/tests/run.py +48 -0
- data/vendor/pygments-main/tests/support.py +15 -0
- data/vendor/pygments-main/tests/test_basic_api.py +294 -0
- data/vendor/pygments-main/tests/test_clexer.py +31 -0
- data/vendor/pygments-main/tests/test_cmdline.py +105 -0
- data/vendor/pygments-main/tests/test_examplefiles.py +97 -0
- data/vendor/pygments-main/tests/test_html_formatter.py +162 -0
- data/vendor/pygments-main/tests/test_latex_formatter.py +55 -0
- data/vendor/pygments-main/tests/test_perllexer.py +137 -0
- data/vendor/pygments-main/tests/test_regexlexer.py +47 -0
- data/vendor/pygments-main/tests/test_token.py +46 -0
- data/vendor/pygments-main/tests/test_using_api.py +40 -0
- data/vendor/pygments-main/tests/test_util.py +116 -0
- data/vendor/simplejson/.gitignore +10 -0
- data/vendor/simplejson/.travis.yml +5 -0
- data/vendor/simplejson/CHANGES.txt +291 -0
- data/vendor/simplejson/LICENSE.txt +19 -0
- data/vendor/simplejson/MANIFEST.in +5 -0
- data/vendor/simplejson/README.rst +19 -0
- data/vendor/simplejson/conf.py +179 -0
- data/vendor/simplejson/index.rst +628 -0
- data/vendor/simplejson/scripts/make_docs.py +18 -0
- data/vendor/simplejson/setup.py +104 -0
- data/vendor/simplejson/simplejson/__init__.py +510 -0
- data/vendor/simplejson/simplejson/_speedups.c +2745 -0
- data/vendor/simplejson/simplejson/decoder.py +425 -0
- data/vendor/simplejson/simplejson/encoder.py +567 -0
- data/vendor/simplejson/simplejson/ordered_dict.py +119 -0
- data/vendor/simplejson/simplejson/scanner.py +77 -0
- data/vendor/simplejson/simplejson/tests/__init__.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_bigint_as_string.py +55 -0
- data/vendor/simplejson/simplejson/tests/test_check_circular.py +30 -0
- data/vendor/simplejson/simplejson/tests/test_decimal.py +66 -0
- data/vendor/simplejson/simplejson/tests/test_decode.py +83 -0
- data/vendor/simplejson/simplejson/tests/test_default.py +9 -0
- data/vendor/simplejson/simplejson/tests/test_dump.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_encode_basestring_ascii.py +46 -0
- data/vendor/simplejson/simplejson/tests/test_encode_for_html.py +32 -0
- data/vendor/simplejson/simplejson/tests/test_errors.py +34 -0
- data/vendor/simplejson/simplejson/tests/test_fail.py +91 -0
- data/vendor/simplejson/simplejson/tests/test_float.py +19 -0
- data/vendor/simplejson/simplejson/tests/test_indent.py +86 -0
- data/vendor/simplejson/simplejson/tests/test_item_sort_key.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_namedtuple.py +121 -0
- data/vendor/simplejson/simplejson/tests/test_pass1.py +76 -0
- data/vendor/simplejson/simplejson/tests/test_pass2.py +14 -0
- data/vendor/simplejson/simplejson/tests/test_pass3.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_recursion.py +67 -0
- data/vendor/simplejson/simplejson/tests/test_scanstring.py +117 -0
- data/vendor/simplejson/simplejson/tests/test_separators.py +42 -0
- data/vendor/simplejson/simplejson/tests/test_speedups.py +20 -0
- data/vendor/simplejson/simplejson/tests/test_tuple.py +49 -0
- data/vendor/simplejson/simplejson/tests/test_unicode.py +109 -0
- data/vendor/simplejson/simplejson/tool.py +39 -0
- metadata +492 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.plugin
|
4
|
+
~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Pygments setuptools plugin interface. The methods defined
|
7
|
+
here also work if setuptools isn't installed but they just
|
8
|
+
return nothing.
|
9
|
+
|
10
|
+
lexer plugins::
|
11
|
+
|
12
|
+
[pygments.lexers]
|
13
|
+
yourlexer = yourmodule:YourLexer
|
14
|
+
|
15
|
+
formatter plugins::
|
16
|
+
|
17
|
+
[pygments.formatters]
|
18
|
+
yourformatter = yourformatter:YourFormatter
|
19
|
+
/.ext = yourformatter:YourFormatter
|
20
|
+
|
21
|
+
As you can see, you can define extensions for the formatter
|
22
|
+
with a leading slash.
|
23
|
+
|
24
|
+
syntax plugins::
|
25
|
+
|
26
|
+
[pygments.styles]
|
27
|
+
yourstyle = yourstyle:YourStyle
|
28
|
+
|
29
|
+
filter plugin::
|
30
|
+
|
31
|
+
[pygments.filter]
|
32
|
+
yourfilter = yourfilter:YourFilter
|
33
|
+
|
34
|
+
|
35
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
36
|
+
:license: BSD, see LICENSE for details.
|
37
|
+
"""
|
38
|
+
try:
|
39
|
+
import pkg_resources
|
40
|
+
except ImportError:
|
41
|
+
pkg_resources = None
|
42
|
+
|
43
|
+
LEXER_ENTRY_POINT = 'pygments.lexers'
|
44
|
+
FORMATTER_ENTRY_POINT = 'pygments.formatters'
|
45
|
+
STYLE_ENTRY_POINT = 'pygments.styles'
|
46
|
+
FILTER_ENTRY_POINT = 'pygments.filters'
|
47
|
+
|
48
|
+
|
49
|
+
def find_plugin_lexers():
|
50
|
+
if pkg_resources is None:
|
51
|
+
return
|
52
|
+
for entrypoint in pkg_resources.iter_entry_points(LEXER_ENTRY_POINT):
|
53
|
+
yield entrypoint.load()
|
54
|
+
|
55
|
+
|
56
|
+
def find_plugin_formatters():
|
57
|
+
if pkg_resources is None:
|
58
|
+
return
|
59
|
+
for entrypoint in pkg_resources.iter_entry_points(FORMATTER_ENTRY_POINT):
|
60
|
+
yield entrypoint.name, entrypoint.load()
|
61
|
+
|
62
|
+
|
63
|
+
def find_plugin_styles():
|
64
|
+
if pkg_resources is None:
|
65
|
+
return
|
66
|
+
for entrypoint in pkg_resources.iter_entry_points(STYLE_ENTRY_POINT):
|
67
|
+
yield entrypoint.name, entrypoint.load()
|
68
|
+
|
69
|
+
|
70
|
+
def find_plugin_filters():
|
71
|
+
if pkg_resources is None:
|
72
|
+
return
|
73
|
+
for entrypoint in pkg_resources.iter_entry_points(FILTER_ENTRY_POINT):
|
74
|
+
yield entrypoint.name, entrypoint.load()
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.scanner
|
4
|
+
~~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
This library implements a regex based scanner. Some languages
|
7
|
+
like Pascal are easy to parse but have some keywords that
|
8
|
+
depend on the context. Because of this it's impossible to lex
|
9
|
+
that just by using a regular expression lexer like the
|
10
|
+
`RegexLexer`.
|
11
|
+
|
12
|
+
Have a look at the `DelphiLexer` to get an idea of how to use
|
13
|
+
this scanner.
|
14
|
+
|
15
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
16
|
+
:license: BSD, see LICENSE for details.
|
17
|
+
"""
|
18
|
+
import re
|
19
|
+
|
20
|
+
|
21
|
+
class EndOfText(RuntimeError):
|
22
|
+
"""
|
23
|
+
Raise if end of text is reached and the user
|
24
|
+
tried to call a match function.
|
25
|
+
"""
|
26
|
+
|
27
|
+
|
28
|
+
class Scanner(object):
|
29
|
+
"""
|
30
|
+
Simple scanner
|
31
|
+
|
32
|
+
All method patterns are regular expression strings (not
|
33
|
+
compiled expressions!)
|
34
|
+
"""
|
35
|
+
|
36
|
+
def __init__(self, text, flags=0):
|
37
|
+
"""
|
38
|
+
:param text: The text which should be scanned
|
39
|
+
:param flags: default regular expression flags
|
40
|
+
"""
|
41
|
+
self.data = text
|
42
|
+
self.data_length = len(text)
|
43
|
+
self.start_pos = 0
|
44
|
+
self.pos = 0
|
45
|
+
self.flags = flags
|
46
|
+
self.last = None
|
47
|
+
self.match = None
|
48
|
+
self._re_cache = {}
|
49
|
+
|
50
|
+
def eos(self):
|
51
|
+
"""`True` if the scanner reached the end of text."""
|
52
|
+
return self.pos >= self.data_length
|
53
|
+
eos = property(eos, eos.__doc__)
|
54
|
+
|
55
|
+
def check(self, pattern):
|
56
|
+
"""
|
57
|
+
Apply `pattern` on the current position and return
|
58
|
+
the match object. (Doesn't touch pos). Use this for
|
59
|
+
lookahead.
|
60
|
+
"""
|
61
|
+
if self.eos:
|
62
|
+
raise EndOfText()
|
63
|
+
if pattern not in self._re_cache:
|
64
|
+
self._re_cache[pattern] = re.compile(pattern, self.flags)
|
65
|
+
return self._re_cache[pattern].match(self.data, self.pos)
|
66
|
+
|
67
|
+
def test(self, pattern):
|
68
|
+
"""Apply a pattern on the current position and check
|
69
|
+
if it patches. Doesn't touch pos."""
|
70
|
+
return self.check(pattern) is not None
|
71
|
+
|
72
|
+
def scan(self, pattern):
|
73
|
+
"""
|
74
|
+
Scan the text for the given pattern and update pos/match
|
75
|
+
and related fields. The return value is a boolen that
|
76
|
+
indicates if the pattern matched. The matched value is
|
77
|
+
stored on the instance as ``match``, the last value is
|
78
|
+
stored as ``last``. ``start_pos`` is the position of the
|
79
|
+
pointer before the pattern was matched, ``pos`` is the
|
80
|
+
end position.
|
81
|
+
"""
|
82
|
+
if self.eos:
|
83
|
+
raise EndOfText()
|
84
|
+
if pattern not in self._re_cache:
|
85
|
+
self._re_cache[pattern] = re.compile(pattern, self.flags)
|
86
|
+
self.last = self.match
|
87
|
+
m = self._re_cache[pattern].match(self.data, self.pos)
|
88
|
+
if m is None:
|
89
|
+
return False
|
90
|
+
self.start_pos = m.start()
|
91
|
+
self.pos = m.end()
|
92
|
+
self.match = m.group()
|
93
|
+
return True
|
94
|
+
|
95
|
+
def get_char(self):
|
96
|
+
"""Scan exactly one char."""
|
97
|
+
self.scan('.')
|
98
|
+
|
99
|
+
def __repr__(self):
|
100
|
+
return '<%s %d/%d>' % (
|
101
|
+
self.__class__.__name__,
|
102
|
+
self.pos,
|
103
|
+
self.data_length
|
104
|
+
)
|
@@ -0,0 +1,117 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.style
|
4
|
+
~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Basic style object.
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
from pygments.token import Token, STANDARD_TYPES
|
13
|
+
|
14
|
+
|
15
|
+
class StyleMeta(type):
|
16
|
+
|
17
|
+
def __new__(mcs, name, bases, dct):
|
18
|
+
obj = type.__new__(mcs, name, bases, dct)
|
19
|
+
for token in STANDARD_TYPES:
|
20
|
+
if token not in obj.styles:
|
21
|
+
obj.styles[token] = ''
|
22
|
+
|
23
|
+
def colorformat(text):
|
24
|
+
if text[0:1] == '#':
|
25
|
+
col = text[1:]
|
26
|
+
if len(col) == 6:
|
27
|
+
return col
|
28
|
+
elif len(col) == 3:
|
29
|
+
return col[0]*2 + col[1]*2 + col[2]*2
|
30
|
+
elif text == '':
|
31
|
+
return ''
|
32
|
+
assert False, "wrong color format %r" % text
|
33
|
+
|
34
|
+
_styles = obj._styles = {}
|
35
|
+
|
36
|
+
for ttype in obj.styles:
|
37
|
+
for token in ttype.split():
|
38
|
+
if token in _styles:
|
39
|
+
continue
|
40
|
+
ndef = _styles.get(token.parent, None)
|
41
|
+
styledefs = obj.styles.get(token, '').split()
|
42
|
+
if not ndef or token is None:
|
43
|
+
ndef = ['', 0, 0, 0, '', '', 0, 0, 0]
|
44
|
+
elif 'noinherit' in styledefs and token is not Token:
|
45
|
+
ndef = _styles[Token][:]
|
46
|
+
else:
|
47
|
+
ndef = ndef[:]
|
48
|
+
_styles[token] = ndef
|
49
|
+
for styledef in obj.styles.get(token, '').split():
|
50
|
+
if styledef == 'noinherit':
|
51
|
+
pass
|
52
|
+
elif styledef == 'bold':
|
53
|
+
ndef[1] = 1
|
54
|
+
elif styledef == 'nobold':
|
55
|
+
ndef[1] = 0
|
56
|
+
elif styledef == 'italic':
|
57
|
+
ndef[2] = 1
|
58
|
+
elif styledef == 'noitalic':
|
59
|
+
ndef[2] = 0
|
60
|
+
elif styledef == 'underline':
|
61
|
+
ndef[3] = 1
|
62
|
+
elif styledef == 'nounderline':
|
63
|
+
ndef[3] = 0
|
64
|
+
elif styledef[:3] == 'bg:':
|
65
|
+
ndef[4] = colorformat(styledef[3:])
|
66
|
+
elif styledef[:7] == 'border:':
|
67
|
+
ndef[5] = colorformat(styledef[7:])
|
68
|
+
elif styledef == 'roman':
|
69
|
+
ndef[6] = 1
|
70
|
+
elif styledef == 'sans':
|
71
|
+
ndef[7] = 1
|
72
|
+
elif styledef == 'mono':
|
73
|
+
ndef[8] = 1
|
74
|
+
else:
|
75
|
+
ndef[0] = colorformat(styledef)
|
76
|
+
|
77
|
+
return obj
|
78
|
+
|
79
|
+
def style_for_token(cls, token):
|
80
|
+
t = cls._styles[token]
|
81
|
+
return {
|
82
|
+
'color': t[0] or None,
|
83
|
+
'bold': bool(t[1]),
|
84
|
+
'italic': bool(t[2]),
|
85
|
+
'underline': bool(t[3]),
|
86
|
+
'bgcolor': t[4] or None,
|
87
|
+
'border': t[5] or None,
|
88
|
+
'roman': bool(t[6]) or None,
|
89
|
+
'sans': bool(t[7]) or None,
|
90
|
+
'mono': bool(t[8]) or None,
|
91
|
+
}
|
92
|
+
|
93
|
+
def list_styles(cls):
|
94
|
+
return list(cls)
|
95
|
+
|
96
|
+
def styles_token(cls, ttype):
|
97
|
+
return ttype in cls._styles
|
98
|
+
|
99
|
+
def __iter__(cls):
|
100
|
+
for token in cls._styles:
|
101
|
+
yield token, cls.style_for_token(token)
|
102
|
+
|
103
|
+
def __len__(cls):
|
104
|
+
return len(cls._styles)
|
105
|
+
|
106
|
+
|
107
|
+
class Style(object):
|
108
|
+
__metaclass__ = StyleMeta
|
109
|
+
|
110
|
+
#: overall background color (``None`` means transparent)
|
111
|
+
background_color = '#ffffff'
|
112
|
+
|
113
|
+
#: highlight background color
|
114
|
+
highlight_color = '#ffffcc'
|
115
|
+
|
116
|
+
#: Style definitions for individual token types.
|
117
|
+
styles = {}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.styles
|
4
|
+
~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Contains built-in styles.
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
from pygments.plugin import find_plugin_styles
|
13
|
+
from pygments.util import ClassNotFound
|
14
|
+
|
15
|
+
|
16
|
+
#: Maps style names to 'submodule::classname'.
|
17
|
+
STYLE_MAP = {
|
18
|
+
'default': 'default::DefaultStyle',
|
19
|
+
'emacs': 'emacs::EmacsStyle',
|
20
|
+
'friendly': 'friendly::FriendlyStyle',
|
21
|
+
'colorful': 'colorful::ColorfulStyle',
|
22
|
+
'autumn': 'autumn::AutumnStyle',
|
23
|
+
'murphy': 'murphy::MurphyStyle',
|
24
|
+
'manni': 'manni::ManniStyle',
|
25
|
+
'monokai': 'monokai::MonokaiStyle',
|
26
|
+
'perldoc': 'perldoc::PerldocStyle',
|
27
|
+
'pastie': 'pastie::PastieStyle',
|
28
|
+
'borland': 'borland::BorlandStyle',
|
29
|
+
'trac': 'trac::TracStyle',
|
30
|
+
'native': 'native::NativeStyle',
|
31
|
+
'fruity': 'fruity::FruityStyle',
|
32
|
+
'bw': 'bw::BlackWhiteStyle',
|
33
|
+
'vim': 'vim::VimStyle',
|
34
|
+
'vs': 'vs::VisualStudioStyle',
|
35
|
+
'tango': 'tango::TangoStyle',
|
36
|
+
'rrt': 'rrt::RrtStyle',
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
def get_style_by_name(name):
|
41
|
+
if name in STYLE_MAP:
|
42
|
+
mod, cls = STYLE_MAP[name].split('::')
|
43
|
+
builtin = "yes"
|
44
|
+
else:
|
45
|
+
for found_name, style in find_plugin_styles():
|
46
|
+
if name == found_name:
|
47
|
+
return style
|
48
|
+
# perhaps it got dropped into our styles package
|
49
|
+
builtin = ""
|
50
|
+
mod = name
|
51
|
+
cls = name.title() + "Style"
|
52
|
+
|
53
|
+
try:
|
54
|
+
mod = __import__('pygments.styles.' + mod, None, None, [cls])
|
55
|
+
except ImportError:
|
56
|
+
raise ClassNotFound("Could not find style module %r" % mod +
|
57
|
+
(builtin and ", though it should be builtin") + ".")
|
58
|
+
try:
|
59
|
+
return getattr(mod, cls)
|
60
|
+
except AttributeError:
|
61
|
+
raise ClassNotFound("Could not find style class %r in style module." % cls)
|
62
|
+
|
63
|
+
|
64
|
+
def get_all_styles():
|
65
|
+
"""Return an generator for all styles by name,
|
66
|
+
both builtin and plugin."""
|
67
|
+
for name in STYLE_MAP:
|
68
|
+
yield name
|
69
|
+
for name, _ in find_plugin_styles():
|
70
|
+
yield name
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.styles.autumn
|
4
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
A colorful style, inspired by the terminal highlighting style.
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
from pygments.style import Style
|
13
|
+
from pygments.token import Keyword, Name, Comment, String, Error, \
|
14
|
+
Number, Operator, Generic, Whitespace
|
15
|
+
|
16
|
+
|
17
|
+
class AutumnStyle(Style):
|
18
|
+
"""
|
19
|
+
A colorful style, inspired by the terminal highlighting style.
|
20
|
+
"""
|
21
|
+
|
22
|
+
default_style = ""
|
23
|
+
|
24
|
+
styles = {
|
25
|
+
Whitespace: '#bbbbbb',
|
26
|
+
|
27
|
+
Comment: 'italic #aaaaaa',
|
28
|
+
Comment.Preproc: 'noitalic #4c8317',
|
29
|
+
Comment.Special: 'italic #0000aa',
|
30
|
+
|
31
|
+
Keyword: '#0000aa',
|
32
|
+
Keyword.Type: '#00aaaa',
|
33
|
+
|
34
|
+
Operator.Word: '#0000aa',
|
35
|
+
|
36
|
+
Name.Builtin: '#00aaaa',
|
37
|
+
Name.Function: '#00aa00',
|
38
|
+
Name.Class: 'underline #00aa00',
|
39
|
+
Name.Namespace: 'underline #00aaaa',
|
40
|
+
Name.Variable: '#aa0000',
|
41
|
+
Name.Constant: '#aa0000',
|
42
|
+
Name.Entity: 'bold #800',
|
43
|
+
Name.Attribute: '#1e90ff',
|
44
|
+
Name.Tag: 'bold #1e90ff',
|
45
|
+
Name.Decorator: '#888888',
|
46
|
+
|
47
|
+
String: '#aa5500',
|
48
|
+
String.Symbol: '#0000aa',
|
49
|
+
String.Regex: '#009999',
|
50
|
+
|
51
|
+
Number: '#009999',
|
52
|
+
|
53
|
+
Generic.Heading: 'bold #000080',
|
54
|
+
Generic.Subheading: 'bold #800080',
|
55
|
+
Generic.Deleted: '#aa0000',
|
56
|
+
Generic.Inserted: '#00aa00',
|
57
|
+
Generic.Error: '#aa0000',
|
58
|
+
Generic.Emph: 'italic',
|
59
|
+
Generic.Strong: 'bold',
|
60
|
+
Generic.Prompt: '#555555',
|
61
|
+
Generic.Output: '#888888',
|
62
|
+
Generic.Traceback: '#aa0000',
|
63
|
+
|
64
|
+
Error: '#F00 bg:#FAA'
|
65
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
pygments.styles.borland
|
4
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Style similar to the style used in the Borland IDEs.
|
7
|
+
|
8
|
+
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
|
9
|
+
:license: BSD, see LICENSE for details.
|
10
|
+
"""
|
11
|
+
|
12
|
+
from pygments.style import Style
|
13
|
+
from pygments.token import Keyword, Name, Comment, String, Error, \
|
14
|
+
Number, Operator, Generic, Whitespace
|
15
|
+
|
16
|
+
|
17
|
+
class BorlandStyle(Style):
|
18
|
+
"""
|
19
|
+
Style similar to the style used in the borland IDEs.
|
20
|
+
"""
|
21
|
+
|
22
|
+
default_style = ''
|
23
|
+
|
24
|
+
styles = {
|
25
|
+
Whitespace: '#bbbbbb',
|
26
|
+
|
27
|
+
Comment: 'italic #008800',
|
28
|
+
Comment.Preproc: 'noitalic #008080',
|
29
|
+
Comment.Special: 'noitalic bold',
|
30
|
+
|
31
|
+
String: '#0000FF',
|
32
|
+
String.Char: '#800080',
|
33
|
+
Number: '#0000FF',
|
34
|
+
Keyword: 'bold #000080',
|
35
|
+
Operator.Word: 'bold',
|
36
|
+
Name.Tag: 'bold #000080',
|
37
|
+
Name.Attribute: '#FF0000',
|
38
|
+
|
39
|
+
Generic.Heading: '#999999',
|
40
|
+
Generic.Subheading: '#aaaaaa',
|
41
|
+
Generic.Deleted: 'bg:#ffdddd #000000',
|
42
|
+
Generic.Inserted: 'bg:#ddffdd #000000',
|
43
|
+
Generic.Error: '#aa0000',
|
44
|
+
Generic.Emph: 'italic',
|
45
|
+
Generic.Strong: 'bold',
|
46
|
+
Generic.Prompt: '#555555',
|
47
|
+
Generic.Output: '#888888',
|
48
|
+
Generic.Traceback: '#aa0000',
|
49
|
+
|
50
|
+
Error: 'bg:#e3d2d2 #a61717'
|
51
|
+
}
|