dependabot-linguist 0.0.1 → 0.212.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +25 -3
- data/Gemfile +0 -9
- data/Gemfile.lock +162 -5
- data/LICENSE +674 -1
- data/{LICENSE.Nonstandard → LICENSE.dependabot-core} +0 -0
- data/Makefile +8 -1
- data/README.md +39 -5
- data/demo_script.rb +50 -0
- data/dependabot-linguist.gemspec +16 -5
- data/devlog.md +186 -0
- data/exe/dependabot-linguist +145 -0
- data/lib/dependabot/linguist/dependabot_file_validator.rb +190 -0
- data/lib/dependabot/linguist/dependabot_patch.rb +8 -0
- data/lib/dependabot/linguist/file_fetchers/base.rb +48 -0
- data/lib/dependabot/linguist/file_fetchers/git_submodules.rb +63 -0
- data/lib/dependabot/linguist/file_fetchers/go_modules.rb +41 -0
- data/lib/dependabot/linguist/language.rb +62 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/contexts.rb +234 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/contexts_applied.rb +36 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/languages.yaml +7950 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/main.rb +55 -0
- data/lib/dependabot/linguist/languages_to_ecosystems/manager_ecosystem_maps.rb +154 -0
- data/lib/dependabot/linguist/languages_to_patch.txt +37 -0
- data/lib/dependabot/linguist/linguist_patch.rb +6 -0
- data/lib/dependabot/linguist/repository.rb +232 -0
- data/lib/dependabot/linguist/version.rb +1 -1
- data/lib/dependabot/linguist.rb +5 -2
- data/smoke-test/README.md +58 -0
- data/smoke-test/bundler/Gemfile +9 -0
- data/smoke-test/bundler/Gemfile.lock +47 -0
- data/smoke-test/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/cargo/Cargo.lock +90 -0
- data/smoke-test/cargo/Cargo.toml +8 -0
- data/smoke-test/composer/composer.json +5 -0
- data/smoke-test/composer/composer.lock +72 -0
- data/smoke-test/composer/vendor/autoload.php +7 -0
- data/smoke-test/composer/vendor/composer/ClassLoader.php +445 -0
- data/smoke-test/composer/vendor/composer/LICENSE +21 -0
- data/smoke-test/composer/vendor/composer/autoload_classmap.php +13 -0
- data/smoke-test/composer/vendor/composer/autoload_namespaces.php +9 -0
- data/smoke-test/composer/vendor/composer/autoload_psr4.php +9 -0
- data/smoke-test/composer/vendor/composer/autoload_real.php +55 -0
- data/smoke-test/composer/vendor/composer/autoload_static.php +23 -0
- data/smoke-test/composer/vendor/composer/installed.json +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/.gitignore +3 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/LICENSE +504 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/README.md +112 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/changelog.md +530 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.phpmailer.php +2758 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.pop3.php +417 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/class.smtp.php +1075 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/composer.json +32 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Callback_function_notes.txt +17 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/DomainKeys_notes.txt +55 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt +23 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/extending.html +148 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/faq.html +67 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/generatedocs.sh +4 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/pop3_article.txt +39 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/docs/use_gmail.txt +44 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/contents.html +20 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/images/phpmailer_mini.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/index.html +50 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_db_smtp_basic.php +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_advanced.php +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_mail_basic.php +41 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_advanced.php +39 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_pop_before_smtp_basic.php +49 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_advanced.php +33 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_sendmail_basic.php +43 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced.php +42 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_advanced_no_auth.php +36 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic.php +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_basic_no_auth.php +53 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_advanced.php +42 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/examples/test_smtp_gmail_basic.php +59 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/class.html2text.inc +489 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/htmlfilter.php +861 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/extras/ntlm_sasl_client.php +185 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-br.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-cz.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-dk.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fo.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-nl.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-no.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php +24 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-se.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php +26 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php +25 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/contents.html +10 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/phpmailerTest.php +1084 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/test_callback.php +84 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test/testemail.php +48 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/LGPLv3.txt +165 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/contents.html +14 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/aikido.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/bkgrnd.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/images/phpmailer.gif +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/index.php +427 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/clipboard.swf +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushBash.js +59 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCSharp.js +64 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCpp.js +99 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushCss.js +93 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDelphi.js +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushDiff.js +43 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushGroovy.js +69 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJScript.js +51 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushJava.js +55 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPerl.js +74 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPhp.js +91 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPlain.js +35 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushPython.js +56 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushRuby.js +57 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushScala.js +53 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushSql.js +68 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushVb.js +58 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shBrushXml.js +71 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shCore.js +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/scripts/shLegacy.js +30 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shCore.js +1949 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/src/shLegacy.js +172 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/help.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/magnifier.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_code.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/page_white_copy.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/printer.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shCore.css +321 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDefault.css +191 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeDjango.css +193 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeEmacs.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeFadeToGrey.css +193 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeMidnight.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/shThemeRDark.css +192 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/styles/wrapping.png +0 -0
- data/smoke-test/composer/vendor/phpmailer/phpmailer/test_script/test.html +46 -0
- data/smoke-test/dependabot-file/no-config/.github/TARGET.yaml +14 -0
- data/smoke-test/dependabot-file/no-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/no-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/no-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/no-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/no-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/no-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/no-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/over-config/.github/TARGET.yaml +17 -0
- data/smoke-test/dependabot-file/over-config/.github/dependabot.yaml +12 -0
- data/smoke-test/dependabot-file/over-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/over-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/over-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/over-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/over-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/over-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/over-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/overer-config/.github/TARGET.yaml +19 -0
- data/smoke-test/dependabot-file/overer-config/.github/dependabot.yaml +12 -0
- data/smoke-test/dependabot-file/overer-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/overer-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/overer-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/overer-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/overer-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/overer-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/overer-config/composer/composer.lock +72 -0
- data/smoke-test/dependabot-file/partial-config/.github/TARGET.yaml +17 -0
- data/smoke-test/dependabot-file/partial-config/.github/dependabot.yaml +7 -0
- data/smoke-test/dependabot-file/partial-config/bundler/Gemfile +9 -0
- data/smoke-test/dependabot-file/partial-config/bundler/Gemfile.lock +47 -0
- data/smoke-test/dependabot-file/partial-config/bundler/dependabot-all-updates-test-staging.gemspec +10 -0
- data/smoke-test/dependabot-file/partial-config/cargo/Cargo.lock +90 -0
- data/smoke-test/dependabot-file/partial-config/cargo/Cargo.toml +8 -0
- data/smoke-test/dependabot-file/partial-config/composer/composer.json +5 -0
- data/smoke-test/dependabot-file/partial-config/composer/composer.lock +72 -0
- data/smoke-test/docker/Dockerfile +19 -0
- data/smoke-test/elm/elm-package.json +15 -0
- data/smoke-test/elm/elm.json +31 -0
- data/smoke-test/github-actions/both/.github/workflows/this.yaml +11 -0
- data/smoke-test/github-actions/both/yaml/action.yml +13 -0
- data/smoke-test/github-actions/invalid/invalid_file.yaml +0 -0
- data/smoke-test/github-actions/workflow/.github/workflows/this.yaml +11 -0
- data/smoke-test/github-actions/yaml/action.yml +13 -0
- data/smoke-test/gitsubmodule/.gitmodules +4 -0
- data/smoke-test/gomod/go.mod +16 -0
- data/smoke-test/gomod/go.sum +18 -0
- data/smoke-test/gomod/gomain.go +14 -0
- data/smoke-test/gradle/.gitignore +1 -0
- data/smoke-test/gradle/build.gradle +65 -0
- data/smoke-test/maven/pom.xml +65 -0
- data/smoke-test/mix/mix.exs +24 -0
- data/smoke-test/mix/mix.lock +5 -0
- data/smoke-test/npm/package-lock.json +166 -0
- data/smoke-test/npm/package.json +22 -0
- data/smoke-test/npm/removed/package-lock.json +44 -0
- data/smoke-test/npm/removed/package.json +15 -0
- data/smoke-test/nuget/project.csproj +14 -0
- data/smoke-test/pip/pip/requirements.txt +5 -0
- data/smoke-test/pip/pip-compile/requirements.in +2 -0
- data/smoke-test/pip/pip-compile/requirements.txt +16 -0
- data/smoke-test/pip/pipenv/Pipfile +13 -0
- data/smoke-test/pip/pipenv/Pipfile.lock +86 -0
- data/smoke-test/pip/poetry/poetry.lock +33 -0
- data/smoke-test/pip/poetry/pyproject.toml +18 -0
- data/smoke-test/pub/pubspec.lock +40 -0
- data/smoke-test/pub/pubspec.yaml +10 -0
- data/smoke-test/terraform/main.tf +143 -0
- metadata +314 -6
- data/LICENSE.GPL-3.0-only +0 -674
@@ -0,0 +1,172 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.0.296 (March 01 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
29
|
+
*/
|
30
|
+
var dp = {
|
31
|
+
SyntaxHighlighter : {}
|
32
|
+
};
|
33
|
+
|
34
|
+
dp.SyntaxHighlighter = {
|
35
|
+
parseParams: function(
|
36
|
+
input,
|
37
|
+
showGutter,
|
38
|
+
showControls,
|
39
|
+
collapseAll,
|
40
|
+
firstLine,
|
41
|
+
showColumns
|
42
|
+
)
|
43
|
+
{
|
44
|
+
function getValue(list, name)
|
45
|
+
{
|
46
|
+
var regex = new XRegExp('^' + name + '\\[(?<value>\\w+)\\]$', 'gi'),
|
47
|
+
match = null
|
48
|
+
;
|
49
|
+
|
50
|
+
for (var i = 0; i < list.length; i++)
|
51
|
+
if ((match = regex.exec(list[i])) != null)
|
52
|
+
return match.value;
|
53
|
+
|
54
|
+
return null;
|
55
|
+
};
|
56
|
+
|
57
|
+
function defaultValue(value, def)
|
58
|
+
{
|
59
|
+
return value != null ? value : def;
|
60
|
+
};
|
61
|
+
|
62
|
+
function asString(value)
|
63
|
+
{
|
64
|
+
return value != null ? value.toString() : null;
|
65
|
+
};
|
66
|
+
|
67
|
+
var parts = input.split(':'),
|
68
|
+
brushName = parts[0],
|
69
|
+
options = {},
|
70
|
+
straight = { 'true' : 'true' }
|
71
|
+
reverse = { 'true' : 'false' },
|
72
|
+
result = null,
|
73
|
+
defaults = SyntaxHighlighter.defaults
|
74
|
+
;
|
75
|
+
|
76
|
+
for (var i in parts)
|
77
|
+
options[parts[i]] = 'true';
|
78
|
+
|
79
|
+
showGutter = asString(defaultValue(showGutter, defaults.gutter));
|
80
|
+
showControls = asString(defaultValue(showControls, defaults.toolbar));
|
81
|
+
collapseAll = asString(defaultValue(collapseAll, defaults.collapse));
|
82
|
+
showColumns = asString(defaultValue(showColumns, defaults.ruler));
|
83
|
+
firstLine = asString(defaultValue(firstLine, defaults['first-line']));
|
84
|
+
|
85
|
+
result = {
|
86
|
+
brush : brushName,
|
87
|
+
gutter : defaultValue(reverse[options.nogutter], showGutter),
|
88
|
+
toolbar : defaultValue(reverse[options.nocontrols], showControls),
|
89
|
+
collapse : defaultValue(straight[options.collapse], collapseAll),
|
90
|
+
ruler : defaultValue(straight[options.showcolumns], showColumns),
|
91
|
+
'first-line' : defaultValue(getValue(parts, 'firstline'), firstLine)
|
92
|
+
};
|
93
|
+
|
94
|
+
return result;
|
95
|
+
},
|
96
|
+
|
97
|
+
HighlightAll: function(
|
98
|
+
name,
|
99
|
+
showGutter /* optional */,
|
100
|
+
showControls /* optional */,
|
101
|
+
collapseAll /* optional */,
|
102
|
+
firstLine /* optional */,
|
103
|
+
showColumns /* optional */
|
104
|
+
)
|
105
|
+
{
|
106
|
+
function findValue()
|
107
|
+
{
|
108
|
+
var a = arguments;
|
109
|
+
|
110
|
+
for (var i = 0; i < a.length; i++)
|
111
|
+
{
|
112
|
+
if (a[i] === null)
|
113
|
+
continue;
|
114
|
+
|
115
|
+
if (typeof(a[i]) == 'string' && a[i] != '')
|
116
|
+
return a[i] + '';
|
117
|
+
|
118
|
+
if (typeof(a[i]) == 'object' && a[i].value != '')
|
119
|
+
return a[i].value + '';
|
120
|
+
}
|
121
|
+
|
122
|
+
return null;
|
123
|
+
};
|
124
|
+
|
125
|
+
function findTagsByName(list, name, tagName)
|
126
|
+
{
|
127
|
+
var tags = document.getElementsByTagName(tagName);
|
128
|
+
|
129
|
+
for (var i = 0; i < tags.length; i++)
|
130
|
+
if (tags[i].getAttribute('name') == name)
|
131
|
+
list.push(tags[i]);
|
132
|
+
}
|
133
|
+
|
134
|
+
var elements = [],
|
135
|
+
highlighter = null,
|
136
|
+
registered = {},
|
137
|
+
propertyName = 'innerHTML'
|
138
|
+
;
|
139
|
+
|
140
|
+
// for some reason IE doesn't find <pre/> by name, however it does see them just fine by tag name...
|
141
|
+
findTagsByName(elements, name, 'pre');
|
142
|
+
findTagsByName(elements, name, 'textarea');
|
143
|
+
|
144
|
+
if (elements.length === 0)
|
145
|
+
return;
|
146
|
+
|
147
|
+
for (var i = 0; i < elements.length; i++)
|
148
|
+
{
|
149
|
+
var element = elements[i],
|
150
|
+
params = findValue(
|
151
|
+
element.attributes['class'], element.className,
|
152
|
+
element.attributes['language'], element.language
|
153
|
+
),
|
154
|
+
language = ''
|
155
|
+
;
|
156
|
+
|
157
|
+
if (params === null)
|
158
|
+
continue;
|
159
|
+
|
160
|
+
params = dp.SyntaxHighlighter.parseParams(
|
161
|
+
params,
|
162
|
+
showGutter,
|
163
|
+
showControls,
|
164
|
+
collapseAll,
|
165
|
+
firstLine,
|
166
|
+
showColumns
|
167
|
+
);
|
168
|
+
|
169
|
+
SyntaxHighlighter.highlight(params, element);
|
170
|
+
}
|
171
|
+
}
|
172
|
+
};
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,321 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.0.296 (March 01 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
29
|
+
*/
|
30
|
+
.syntaxhighlighter,
|
31
|
+
.syntaxhighlighter div,
|
32
|
+
.syntaxhighlighter code,
|
33
|
+
.syntaxhighlighter span
|
34
|
+
{
|
35
|
+
margin: 0 !important;
|
36
|
+
padding: 0 !important;
|
37
|
+
border: 0 !important;
|
38
|
+
outline: 0 !important;
|
39
|
+
background: none !important;
|
40
|
+
text-align: left !important;
|
41
|
+
float: none !important;
|
42
|
+
vertical-align: baseline !important;
|
43
|
+
position: static !important;
|
44
|
+
left: auto !important;
|
45
|
+
top: auto !important;
|
46
|
+
right: auto !important;
|
47
|
+
bottom: auto !important;
|
48
|
+
height: auto !important;
|
49
|
+
width: auto !important;
|
50
|
+
line-height: 1.1em !important;
|
51
|
+
font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
|
52
|
+
font-weight: normal !important;
|
53
|
+
font-style: normal !important;
|
54
|
+
font-size: 1em !important;
|
55
|
+
}
|
56
|
+
|
57
|
+
.syntaxhighlighter
|
58
|
+
{
|
59
|
+
width: 100% !important;
|
60
|
+
margin: 1em 0 1em 0 !important;
|
61
|
+
padding: 1px !important; /* adds a little border on top and bottom */
|
62
|
+
position: relative !important;
|
63
|
+
}
|
64
|
+
|
65
|
+
.syntaxhighlighter .bold {
|
66
|
+
font-weight: bold !important;
|
67
|
+
}
|
68
|
+
|
69
|
+
.syntaxhighlighter .italic {
|
70
|
+
font-style: italic !important;
|
71
|
+
}
|
72
|
+
|
73
|
+
.syntaxhighlighter .line .number
|
74
|
+
{
|
75
|
+
float: left !important;
|
76
|
+
width: 3em !important;
|
77
|
+
padding-right: .3em !important;
|
78
|
+
text-align: right !important;
|
79
|
+
display: block !important;
|
80
|
+
}
|
81
|
+
|
82
|
+
/* Disable numbers when no gutter option is set */
|
83
|
+
.syntaxhighlighter.nogutter .line .number
|
84
|
+
{
|
85
|
+
display: none !important;
|
86
|
+
}
|
87
|
+
|
88
|
+
.syntaxhighlighter .line .content
|
89
|
+
{
|
90
|
+
margin-left: 3.3em !important;
|
91
|
+
padding-left: .5em !important;
|
92
|
+
display: block !important;
|
93
|
+
}
|
94
|
+
|
95
|
+
.syntaxhighlighter .line .content .block
|
96
|
+
{
|
97
|
+
display: block !important;
|
98
|
+
padding-left: 1.5em !important;
|
99
|
+
text-indent: -1.5em !important;
|
100
|
+
}
|
101
|
+
|
102
|
+
.syntaxhighlighter .line .content .spaces
|
103
|
+
{
|
104
|
+
display: none !important;
|
105
|
+
}
|
106
|
+
|
107
|
+
/* Disable border and margin on the lines when no gutter option is set */
|
108
|
+
.syntaxhighlighter.nogutter .line .content
|
109
|
+
{
|
110
|
+
margin-left: 0 !important;
|
111
|
+
border-left: none !important;
|
112
|
+
}
|
113
|
+
|
114
|
+
.syntaxhighlighter .bar
|
115
|
+
{
|
116
|
+
}
|
117
|
+
|
118
|
+
.syntaxhighlighter.collapsed .bar
|
119
|
+
{
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
.syntaxhighlighter.nogutter .ruler
|
124
|
+
{
|
125
|
+
margin-left: 0 !important;
|
126
|
+
padding-left: 0 !important;
|
127
|
+
}
|
128
|
+
|
129
|
+
.syntaxhighlighter .ruler
|
130
|
+
{
|
131
|
+
padding: 0 0 .5em .5em !important;
|
132
|
+
margin-left: 3.3em !important;
|
133
|
+
overflow: hidden !important;
|
134
|
+
}
|
135
|
+
|
136
|
+
/* Adjust some properties when collapsed */
|
137
|
+
|
138
|
+
.syntaxhighlighter.collapsed .lines,
|
139
|
+
.syntaxhighlighter.collapsed .ruler
|
140
|
+
{
|
141
|
+
display: none !important;
|
142
|
+
}
|
143
|
+
|
144
|
+
/* Styles for the toolbar */
|
145
|
+
|
146
|
+
.syntaxhighlighter .toolbar
|
147
|
+
{
|
148
|
+
position: absolute !important;
|
149
|
+
right: 0px !important;
|
150
|
+
top: 0px !important;
|
151
|
+
font-size: 1px !important;
|
152
|
+
padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
|
153
|
+
}
|
154
|
+
|
155
|
+
.syntaxhighlighter.collapsed .toolbar
|
156
|
+
{
|
157
|
+
font-size: 80% !important;
|
158
|
+
padding: .2em 0 .5em .5em !important;
|
159
|
+
position: static !important;
|
160
|
+
}
|
161
|
+
|
162
|
+
.syntaxhighlighter .toolbar a.item,
|
163
|
+
.syntaxhighlighter .toolbar .item
|
164
|
+
{
|
165
|
+
display: block !important;
|
166
|
+
float: left !important;
|
167
|
+
margin-left: 8px !important;
|
168
|
+
background-repeat: no-repeat !important;
|
169
|
+
overflow: hidden !important;
|
170
|
+
text-indent: -5000px !important;
|
171
|
+
}
|
172
|
+
|
173
|
+
.syntaxhighlighter.collapsed .toolbar .item
|
174
|
+
{
|
175
|
+
display: none !important;
|
176
|
+
}
|
177
|
+
|
178
|
+
.syntaxhighlighter.collapsed .toolbar .item.expandSource
|
179
|
+
{
|
180
|
+
background-image: url(magnifier.png) !important;
|
181
|
+
display: inline !important;
|
182
|
+
text-indent: 0 !important;
|
183
|
+
width: auto !important;
|
184
|
+
float: none !important;
|
185
|
+
height: 16px !important;
|
186
|
+
padding-left: 20px !important;
|
187
|
+
}
|
188
|
+
|
189
|
+
.syntaxhighlighter .toolbar .item.viewSource
|
190
|
+
{
|
191
|
+
background-image: url(page_white_code.png) !important;
|
192
|
+
}
|
193
|
+
|
194
|
+
.syntaxhighlighter .toolbar .item.printSource
|
195
|
+
{
|
196
|
+
background-image: url(printer.png) !important;
|
197
|
+
}
|
198
|
+
|
199
|
+
.syntaxhighlighter .toolbar .item.copyToClipboard
|
200
|
+
{
|
201
|
+
text-indent: 0 !important;
|
202
|
+
background: none !important;
|
203
|
+
overflow: visible !important;
|
204
|
+
}
|
205
|
+
|
206
|
+
.syntaxhighlighter .toolbar .item.about
|
207
|
+
{
|
208
|
+
background-image: url(help.png) !important;
|
209
|
+
}
|
210
|
+
|
211
|
+
/**
|
212
|
+
* Print view.
|
213
|
+
* Colors are based on the default theme without background.
|
214
|
+
*/
|
215
|
+
|
216
|
+
.syntaxhighlighter.printing,
|
217
|
+
.syntaxhighlighter.printing .line.alt1 .content,
|
218
|
+
.syntaxhighlighter.printing .line.alt2 .content,
|
219
|
+
.syntaxhighlighter.printing .line.highlighted .number,
|
220
|
+
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
|
221
|
+
.syntaxhighlighter.printing .line.highlighted.alt2 .content,
|
222
|
+
.syntaxhighlighter.printing .line .content .block
|
223
|
+
{
|
224
|
+
background: none !important;
|
225
|
+
}
|
226
|
+
|
227
|
+
/* Gutter line numbers */
|
228
|
+
.syntaxhighlighter.printing .line .number
|
229
|
+
{
|
230
|
+
color: #bbb !important;
|
231
|
+
}
|
232
|
+
|
233
|
+
/* Add border to the lines */
|
234
|
+
.syntaxhighlighter.printing .line .content
|
235
|
+
{
|
236
|
+
color: #000 !important;
|
237
|
+
}
|
238
|
+
|
239
|
+
/* Toolbar when visible */
|
240
|
+
.syntaxhighlighter.printing .toolbar,
|
241
|
+
.syntaxhighlighter.printing .ruler
|
242
|
+
{
|
243
|
+
display: none !important;
|
244
|
+
}
|
245
|
+
|
246
|
+
.syntaxhighlighter.printing a
|
247
|
+
{
|
248
|
+
text-decoration: none !important;
|
249
|
+
}
|
250
|
+
|
251
|
+
.syntaxhighlighter.printing .plain,
|
252
|
+
.syntaxhighlighter.printing .plain a
|
253
|
+
{
|
254
|
+
color: #000 !important;
|
255
|
+
}
|
256
|
+
|
257
|
+
.syntaxhighlighter.printing .comments,
|
258
|
+
.syntaxhighlighter.printing .comments a
|
259
|
+
{
|
260
|
+
color: #008200 !important;
|
261
|
+
}
|
262
|
+
|
263
|
+
.syntaxhighlighter.printing .string,
|
264
|
+
.syntaxhighlighter.printing .string a
|
265
|
+
{
|
266
|
+
color: blue !important;
|
267
|
+
}
|
268
|
+
|
269
|
+
.syntaxhighlighter.printing .keyword
|
270
|
+
{
|
271
|
+
color: #069 !important;
|
272
|
+
font-weight: bold !important;
|
273
|
+
}
|
274
|
+
|
275
|
+
.syntaxhighlighter.printing .preprocessor
|
276
|
+
{
|
277
|
+
color: gray !important;
|
278
|
+
}
|
279
|
+
|
280
|
+
.syntaxhighlighter.printing .variable
|
281
|
+
{
|
282
|
+
color: #a70 !important;
|
283
|
+
}
|
284
|
+
|
285
|
+
.syntaxhighlighter.printing .value
|
286
|
+
{
|
287
|
+
color: #090 !important;
|
288
|
+
}
|
289
|
+
|
290
|
+
.syntaxhighlighter.printing .functions
|
291
|
+
{
|
292
|
+
color: #ff1493 !important;
|
293
|
+
}
|
294
|
+
|
295
|
+
.syntaxhighlighter.printing .constants
|
296
|
+
{
|
297
|
+
color: #0066CC !important;
|
298
|
+
}
|
299
|
+
|
300
|
+
.syntaxhighlighter.printing .script
|
301
|
+
{
|
302
|
+
font-weight: bold !important;
|
303
|
+
}
|
304
|
+
|
305
|
+
.syntaxhighlighter.printing .color1,
|
306
|
+
.syntaxhighlighter.printing .color1 a
|
307
|
+
{
|
308
|
+
color: #808080 !important;
|
309
|
+
}
|
310
|
+
|
311
|
+
.syntaxhighlighter.printing .color2,
|
312
|
+
.syntaxhighlighter.printing .color2 a
|
313
|
+
{
|
314
|
+
color: #ff1493 !important;
|
315
|
+
}
|
316
|
+
|
317
|
+
.syntaxhighlighter.printing .color3,
|
318
|
+
.syntaxhighlighter.printing .color3 a
|
319
|
+
{
|
320
|
+
color: red !important;
|
321
|
+
}
|
@@ -0,0 +1,191 @@
|
|
1
|
+
/**
|
2
|
+
* SyntaxHighlighter
|
3
|
+
* http://alexgorbatchev.com/
|
4
|
+
*
|
5
|
+
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
6
|
+
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
|
7
|
+
*
|
8
|
+
* @version
|
9
|
+
* 2.0.296 (March 01 2009)
|
10
|
+
*
|
11
|
+
* @copyright
|
12
|
+
* Copyright (C) 2004-2009 Alex Gorbatchev.
|
13
|
+
*
|
14
|
+
* @license
|
15
|
+
* This file is part of SyntaxHighlighter.
|
16
|
+
*
|
17
|
+
* SyntaxHighlighter is free software: you can redistribute it and/or modify
|
18
|
+
* it under the terms of the GNU General Public License as published by
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
20
|
+
* (at your option) any later version.
|
21
|
+
*
|
22
|
+
* SyntaxHighlighter is distributed in the hope that it will be useful,
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
25
|
+
* GNU General Public License for more details.
|
26
|
+
*
|
27
|
+
* You should have received a copy of the GNU General Public License
|
28
|
+
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/licenses/>.
|
29
|
+
*/
|
30
|
+
/************************************
|
31
|
+
* Default Syntax Highlighter theme.
|
32
|
+
*
|
33
|
+
* Interface elements.
|
34
|
+
************************************/
|
35
|
+
|
36
|
+
.syntaxhighlighter
|
37
|
+
{
|
38
|
+
background-color: #E7E5DC !important;
|
39
|
+
}
|
40
|
+
|
41
|
+
/* Highlighed line number */
|
42
|
+
.syntaxhighlighter .line.highlighted .number
|
43
|
+
{
|
44
|
+
background-color: #6CE26C !important;
|
45
|
+
color: black !important;
|
46
|
+
}
|
47
|
+
|
48
|
+
/* Highlighed line */
|
49
|
+
.syntaxhighlighter .line.highlighted.alt1 .content,
|
50
|
+
.syntaxhighlighter .line.highlighted.alt2 .content
|
51
|
+
{
|
52
|
+
background-color: #6CE26C !important;
|
53
|
+
}
|
54
|
+
|
55
|
+
/* Gutter line numbers */
|
56
|
+
.syntaxhighlighter .line .number
|
57
|
+
{
|
58
|
+
color: #5C5C5C !important;
|
59
|
+
}
|
60
|
+
|
61
|
+
/* Add border to the lines */
|
62
|
+
.syntaxhighlighter .line .content
|
63
|
+
{
|
64
|
+
border-left: 3px solid #6CE26C !important;
|
65
|
+
color: #000 !important;
|
66
|
+
}
|
67
|
+
|
68
|
+
.syntaxhighlighter.printing .line .content
|
69
|
+
{
|
70
|
+
border: 0 !important;
|
71
|
+
}
|
72
|
+
|
73
|
+
/* First line */
|
74
|
+
.syntaxhighlighter .line.alt1 .content
|
75
|
+
{
|
76
|
+
background-color: #fff !important;
|
77
|
+
}
|
78
|
+
|
79
|
+
/* Second line */
|
80
|
+
.syntaxhighlighter .line.alt2 .content
|
81
|
+
{
|
82
|
+
background-color: #F8F8F8 !important;
|
83
|
+
}
|
84
|
+
|
85
|
+
.syntaxhighlighter .line .content .block
|
86
|
+
{
|
87
|
+
background: url(wrapping.png) 0 1.1em no-repeat !important;
|
88
|
+
}
|
89
|
+
|
90
|
+
.syntaxhighlighter .ruler
|
91
|
+
{
|
92
|
+
color: silver !important;
|
93
|
+
background-color: #F8F8F8 !important;
|
94
|
+
border-left: 3px solid #6CE26C !important;
|
95
|
+
}
|
96
|
+
|
97
|
+
.syntaxhighlighter.nogutter .ruler
|
98
|
+
{
|
99
|
+
border: 0 !important;
|
100
|
+
}
|
101
|
+
|
102
|
+
.syntaxhighlighter .toolbar
|
103
|
+
{
|
104
|
+
background-color: #F8F8F8 !important;
|
105
|
+
border: #E7E5DC solid 1px !important;
|
106
|
+
}
|
107
|
+
|
108
|
+
.syntaxhighlighter .toolbar a
|
109
|
+
{
|
110
|
+
color: #a0a0a0 !important;
|
111
|
+
}
|
112
|
+
|
113
|
+
.syntaxhighlighter .toolbar a:hover
|
114
|
+
{
|
115
|
+
color: red !important;
|
116
|
+
}
|
117
|
+
|
118
|
+
/************************************
|
119
|
+
* Actual syntax highlighter colors.
|
120
|
+
************************************/
|
121
|
+
.syntaxhighlighter .plain,
|
122
|
+
.syntaxhighlighter .plain a
|
123
|
+
{
|
124
|
+
color: #000 !important;
|
125
|
+
}
|
126
|
+
|
127
|
+
.syntaxhighlighter .comments,
|
128
|
+
.syntaxhighlighter .comments a
|
129
|
+
{
|
130
|
+
color: #008200 !important;
|
131
|
+
}
|
132
|
+
|
133
|
+
.syntaxhighlighter .string,
|
134
|
+
.syntaxhighlighter .string a
|
135
|
+
{
|
136
|
+
color: blue !important;
|
137
|
+
}
|
138
|
+
|
139
|
+
.syntaxhighlighter .keyword
|
140
|
+
{
|
141
|
+
color: #069 !important;
|
142
|
+
font-weight: bold !important;
|
143
|
+
}
|
144
|
+
|
145
|
+
.syntaxhighlighter .preprocessor
|
146
|
+
{
|
147
|
+
color: gray !important;
|
148
|
+
}
|
149
|
+
|
150
|
+
.syntaxhighlighter .variable
|
151
|
+
{
|
152
|
+
color: #a70 !important;
|
153
|
+
}
|
154
|
+
|
155
|
+
.syntaxhighlighter .value
|
156
|
+
{
|
157
|
+
color: #090 !important;
|
158
|
+
}
|
159
|
+
|
160
|
+
.syntaxhighlighter .functions
|
161
|
+
{
|
162
|
+
color: #ff1493 !important;
|
163
|
+
}
|
164
|
+
|
165
|
+
.syntaxhighlighter .constants
|
166
|
+
{
|
167
|
+
color: #0066CC !important;
|
168
|
+
}
|
169
|
+
|
170
|
+
.syntaxhighlighter .script
|
171
|
+
{
|
172
|
+
background-color: yellow !important;
|
173
|
+
}
|
174
|
+
|
175
|
+
.syntaxhighlighter .color1,
|
176
|
+
.syntaxhighlighter .color1 a
|
177
|
+
{
|
178
|
+
color: #808080 !important;
|
179
|
+
}
|
180
|
+
|
181
|
+
.syntaxhighlighter .color2,
|
182
|
+
.syntaxhighlighter .color2 a
|
183
|
+
{
|
184
|
+
color: #ff1493 !important;
|
185
|
+
}
|
186
|
+
|
187
|
+
.syntaxhighlighter .color3,
|
188
|
+
.syntaxhighlighter .color3 a
|
189
|
+
{
|
190
|
+
color: red !important;
|
191
|
+
}
|