upjs-rails 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dist/up.js +71 -23
- data/dist/up.min.js +1 -1
- data/lib/assets/javascripts/up/form.js.coffee +50 -16
- data/lib/assets/javascripts/up/modal.js.coffee +22 -8
- data/lib/assets/javascripts/up/proxy.js.coffee +1 -1
- data/lib/upjs/rails/version.rb +1 -1
- metadata +3 -40
- data/doc/theme/Gruntfile.js +0 -25
- data/doc/theme/README.md +0 -29
- data/doc/theme/assets/css/external-small.png +0 -0
- data/doc/theme/assets/css/logo.png +0 -0
- data/doc/theme/assets/css/main.css +0 -859
- data/doc/theme/assets/css/main.less +0 -897
- data/doc/theme/assets/favicon.png +0 -0
- data/doc/theme/assets/img/bgscreen.png +0 -0
- data/doc/theme/assets/img/spinner.gif +0 -0
- data/doc/theme/assets/index.html +0 -10
- data/doc/theme/assets/js/api-filter.js +0 -52
- data/doc/theme/assets/js/api-list.js +0 -251
- data/doc/theme/assets/js/api-search.js +0 -98
- data/doc/theme/assets/js/apidocs.js +0 -369
- data/doc/theme/assets/js/yui-prettify.js +0 -17
- data/doc/theme/assets/vendor/prettify/CHANGES.html +0 -130
- data/doc/theme/assets/vendor/prettify/COPYING +0 -202
- data/doc/theme/assets/vendor/prettify/README.html +0 -203
- data/doc/theme/assets/vendor/prettify/prettify-min.css +0 -1
- data/doc/theme/assets/vendor/prettify/prettify-min.js +0 -1
- data/doc/theme/layouts/main.handlebars +0 -54
- data/doc/theme/layouts/xhr.handlebars +0 -7
- data/doc/theme/package.json +0 -53
- data/doc/theme/partials/attrs.handlebars +0 -141
- data/doc/theme/partials/classes.handlebars +0 -210
- data/doc/theme/partials/events.handlebars +0 -145
- data/doc/theme/partials/exampleurl.handlebars +0 -8
- data/doc/theme/partials/files.handlebars +0 -7
- data/doc/theme/partials/index.handlebars +0 -18
- data/doc/theme/partials/method.handlebars +0 -201
- data/doc/theme/partials/module.handlebars +0 -92
- data/doc/theme/partials/options.handlebars +0 -23
- data/doc/theme/partials/props.handlebars +0 -128
- data/doc/theme/partials/sidebar.handlebars +0 -27
- data/doc/theme/theme.json +0 -4
- data/doc/yuidoc-helpers.js +0 -0
- data/doc/yuidoc.json +0 -15
- /data/{doc/theme/api/.keep → design/rename.txt} +0 -0
@@ -1,202 +0,0 @@
|
|
1
|
-
|
2
|
-
Apache License
|
3
|
-
Version 2.0, January 2004
|
4
|
-
http://www.apache.org/licenses/
|
5
|
-
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
-
|
8
|
-
1. Definitions.
|
9
|
-
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
-
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
-
the copyright owner that is granting the License.
|
15
|
-
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
-
other entities that control, are controlled by, or are under common
|
18
|
-
control with that entity. For the purposes of this definition,
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
20
|
-
direction or management of such entity, whether by contract or
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
-
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
-
exercising permissions granted by this License.
|
26
|
-
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
28
|
-
including but not limited to software source code, documentation
|
29
|
-
source, and configuration files.
|
30
|
-
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
32
|
-
transformation or translation of a Source form, including but
|
33
|
-
not limited to compiled object code, generated documentation,
|
34
|
-
and conversions to other media types.
|
35
|
-
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
37
|
-
Object form, made available under the License, as indicated by a
|
38
|
-
copyright notice that is included in or attached to the work
|
39
|
-
(an example is provided in the Appendix below).
|
40
|
-
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
-
the Work and Derivative Works thereof.
|
48
|
-
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
50
|
-
the original version of the Work and any modifications or additions
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
-
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
65
|
-
subsequently incorporated within the Work.
|
66
|
-
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
73
|
-
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
-
where such license applies only to those patent claims licensable
|
80
|
-
by such Contributor that are necessarily infringed by their
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
83
|
-
institute patent litigation against any entity (including a
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
86
|
-
or contributory patent infringement, then any patent licenses
|
87
|
-
granted to You under this License for that Work shall terminate
|
88
|
-
as of the date such litigation is filed.
|
89
|
-
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
92
|
-
modifications, and in Source or Object form, provided that You
|
93
|
-
meet the following conditions:
|
94
|
-
|
95
|
-
(a) You must give any other recipients of the Work or
|
96
|
-
Derivative Works a copy of this License; and
|
97
|
-
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
99
|
-
stating that You changed the files; and
|
100
|
-
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
103
|
-
attribution notices from the Source form of the Work,
|
104
|
-
excluding those notices that do not pertain to any part of
|
105
|
-
the Derivative Works; and
|
106
|
-
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
109
|
-
include a readable copy of the attribution notices contained
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
112
|
-
of the following places: within a NOTICE text file distributed
|
113
|
-
as part of the Derivative Works; within the Source form or
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
115
|
-
within a display generated by the Derivative Works, if and
|
116
|
-
wherever such third-party notices normally appear. The contents
|
117
|
-
of the NOTICE file are for informational purposes only and
|
118
|
-
do not modify the License. You may add Your own attribution
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
121
|
-
that such additional attribution notices cannot be construed
|
122
|
-
as modifying the License.
|
123
|
-
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
125
|
-
may provide additional or different license terms and conditions
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
129
|
-
the conditions stated in this License.
|
130
|
-
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
134
|
-
this License, without any additional terms or conditions.
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
-
the terms of any separate license agreement you may have executed
|
137
|
-
with Licensor regarding such Contributions.
|
138
|
-
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
141
|
-
except as required for reasonable and customary use in describing the
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
-
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
153
|
-
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
159
|
-
incidental, or consequential damages of any character arising as a
|
160
|
-
result of this License or out of the use or inability to use the
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
163
|
-
other commercial damages or losses), even if such Contributor
|
164
|
-
has been advised of the possibility of such damages.
|
165
|
-
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
-
or other liability obligations and/or rights consistent with this
|
170
|
-
License. However, in accepting such obligations, You may act only
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
175
|
-
of your accepting any such warranty or additional liability.
|
176
|
-
|
177
|
-
END OF TERMS AND CONDITIONS
|
178
|
-
|
179
|
-
APPENDIX: How to apply the Apache License to your work.
|
180
|
-
|
181
|
-
To apply the Apache License to your work, attach the following
|
182
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
-
replaced with your own identifying information. (Don't include
|
184
|
-
the brackets!) The text should be enclosed in the appropriate
|
185
|
-
comment syntax for the file format. We also recommend that a
|
186
|
-
file or class name and description of purpose be included on the
|
187
|
-
same "printed page" as the copyright notice for easier
|
188
|
-
identification within third-party archives.
|
189
|
-
|
190
|
-
Copyright [yyyy] [name of copyright owner]
|
191
|
-
|
192
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
-
you may not use this file except in compliance with the License.
|
194
|
-
You may obtain a copy of the License at
|
195
|
-
|
196
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
-
|
198
|
-
Unless required by applicable law or agreed to in writing, software
|
199
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
-
See the License for the specific language governing permissions and
|
202
|
-
limitations under the License.
|
@@ -1,203 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
|
4
|
-
<html>
|
5
|
-
<head>
|
6
|
-
<title>Javascript code prettifier</title>
|
7
|
-
|
8
|
-
<link href="src/prettify.css" type="text/css" rel="stylesheet" />
|
9
|
-
|
10
|
-
<script src="src/prettify.js" type="text/javascript"></script>
|
11
|
-
|
12
|
-
<style type="text/css">
|
13
|
-
body { margin-left: .5in }
|
14
|
-
h1, h2, h3, h4, .footer { margin-left: -.4in; }
|
15
|
-
</style>
|
16
|
-
</head>
|
17
|
-
|
18
|
-
<body onload="prettyPrint()" bgcolor="white">
|
19
|
-
<small style="float: right">Languages : <a href="README-zh-Hans.html">CH</a></small>
|
20
|
-
<h1>Javascript code prettifier</h1>
|
21
|
-
|
22
|
-
<h2>Setup</h2>
|
23
|
-
<ol>
|
24
|
-
<li><a href="http://code.google.com/p/google-code-prettify/downloads/list">Download</a> a distribution
|
25
|
-
<li>Include the script and stylesheets in your document
|
26
|
-
(you will need to make sure the css and js file are on your server, and
|
27
|
-
adjust the paths in the <tt>script</tt> and <tt>link</tt> tag)
|
28
|
-
<pre class="prettyprint">
|
29
|
-
<link href="prettify.css" type="text/css" rel="stylesheet" />
|
30
|
-
<script type="text/javascript" src="prettify.js"></script></pre>
|
31
|
-
<li>Add <code class="prettyprint lang-html">onload="prettyPrint()"</code> to your
|
32
|
-
document's body tag.
|
33
|
-
<li>Modify the stylesheet to get the coloring you prefer</li>
|
34
|
-
</ol>
|
35
|
-
|
36
|
-
<h2>Usage</h2>
|
37
|
-
<p>Put code snippets in
|
38
|
-
<tt><pre class="prettyprint">...</pre></tt>
|
39
|
-
or <tt><code class="prettyprint">...</code></tt>
|
40
|
-
and it will automatically be pretty printed.
|
41
|
-
|
42
|
-
<table summary="code examples">
|
43
|
-
<tr>
|
44
|
-
<th>The original
|
45
|
-
<th>Prettier
|
46
|
-
<tr>
|
47
|
-
<td><pre style="border: 1px solid #888;padding: 2px"
|
48
|
-
><a name="voila1"></a>class Voila {
|
49
|
-
public:
|
50
|
-
// Voila
|
51
|
-
static const string VOILA = "Voila";
|
52
|
-
|
53
|
-
// will not interfere with embedded <a href="#voila1">tags</a>.
|
54
|
-
}</pre>
|
55
|
-
|
56
|
-
<td><pre class="prettyprint"><a name="voila2"></a>class Voila {
|
57
|
-
public:
|
58
|
-
// Voila
|
59
|
-
static const string VOILA = "Voila";
|
60
|
-
|
61
|
-
// will not interfere with embedded <a href="#voila2">tags</a>.
|
62
|
-
}</pre>
|
63
|
-
</table>
|
64
|
-
|
65
|
-
<h2>FAQ</h2>
|
66
|
-
<h3 id="langs">Which languages does it work for?</h3>
|
67
|
-
<p>The comments in <tt>prettify.js</tt> are authoritative but the lexer
|
68
|
-
should work on a number of languages including C and friends,
|
69
|
-
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
|
70
|
-
It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl
|
71
|
-
and Ruby, but, because of commenting conventions, doesn't work on
|
72
|
-
Smalltalk, or CAML-like languages.</p>
|
73
|
-
|
74
|
-
<p>LISPy languages are supported via an extension:
|
75
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"
|
76
|
-
><code>lang-lisp.js</code></a>.</p>
|
77
|
-
<p>And similarly for
|
78
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js"
|
79
|
-
><code>CSS</code></a>,
|
80
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js"
|
81
|
-
><code>Haskell</code></a>,
|
82
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"
|
83
|
-
><code>Lua</code></a>,
|
84
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"
|
85
|
-
><code>OCAML, SML, F#</code></a>,
|
86
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"
|
87
|
-
><code>Visual Basic</code></a>,
|
88
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"
|
89
|
-
><code>SQL</code></a>,
|
90
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"
|
91
|
-
><code>Protocol Buffers</code></a>, and
|
92
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"
|
93
|
-
><code>WikiText</code></a>..
|
94
|
-
|
95
|
-
<p>If you'd like to add an extension for your favorite language, please
|
96
|
-
look at <tt>src/lang-lisp.js</tt> and file an
|
97
|
-
<a href="http://code.google.com/p/google-code-prettify/issues/list"
|
98
|
-
>issue</a> including your language extension, and a testcase.</p>
|
99
|
-
|
100
|
-
<h3>How do I specify which language my code is in?</h3>
|
101
|
-
<p>You don't need to specify the language since <code>prettyprint()</code>
|
102
|
-
will guess. You can specify a language by specifying the language extension
|
103
|
-
along with the <code>prettyprint</code> class like so:</p>
|
104
|
-
<pre class="prettyprint lang-html"
|
105
|
-
><pre class="prettyprint <b>lang-html</b>">
|
106
|
-
The lang-* class specifies the language file extensions.
|
107
|
-
File extensions supported by default include
|
108
|
-
"bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
|
109
|
-
"java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
|
110
|
-
"xhtml", "xml", "xsl".
|
111
|
-
</pre></pre>
|
112
|
-
|
113
|
-
<h3>It doesn't work on <tt><obfuscated code sample></tt>?</h3>
|
114
|
-
<p>Yes. Prettifying obfuscated code is like putting lipstick on a pig
|
115
|
-
— i.e. outside the scope of this tool.</p>
|
116
|
-
|
117
|
-
<h3>Which browsers does it work with?</h3>
|
118
|
-
<p>It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4.
|
119
|
-
Look at <a href="tests/prettify_test.html">the test page</a> to see if it
|
120
|
-
works in your browser.</p>
|
121
|
-
|
122
|
-
<h3>What's changed?</h3>
|
123
|
-
<p>See the <a href="CHANGES.html">change log</a></p>
|
124
|
-
|
125
|
-
<h3>Why doesn't Prettyprinting of strings work on WordPress?</h3>
|
126
|
-
<p>Apparently wordpress does "smart quoting" which changes close quotes.
|
127
|
-
This causes end quotes to not match up with open quotes.
|
128
|
-
<p>This breaks prettifying as well as copying and pasting of code samples.
|
129
|
-
See
|
130
|
-
<a href="http://wordpress.org/support/topic/125038"
|
131
|
-
>WordPress's help center</a> for info on how to stop smart quoting of code
|
132
|
-
snippets.</p>
|
133
|
-
|
134
|
-
<h3 id="linenums">How do I put line numbers in my code?</h3>
|
135
|
-
<p>You can use the <code>linenums</code> class to turn on line
|
136
|
-
numbering. If your code doesn't start at line number 1, you can
|
137
|
-
add a colon and a line number to the end of that class as in
|
138
|
-
<code>linenums:52</code>.
|
139
|
-
|
140
|
-
<p>For example
|
141
|
-
<pre class="prettyprint"><pre class="prettyprint linenums:<b>4</b>"
|
142
|
-
>// This is line 4.
|
143
|
-
foo();
|
144
|
-
bar();
|
145
|
-
baz();
|
146
|
-
boo();
|
147
|
-
far();
|
148
|
-
faz();
|
149
|
-
<pre></pre>
|
150
|
-
produces
|
151
|
-
<pre class="prettyprint linenums:4"
|
152
|
-
>// This is line 4.
|
153
|
-
foo();
|
154
|
-
bar();
|
155
|
-
baz();
|
156
|
-
boo();
|
157
|
-
far();
|
158
|
-
faz();
|
159
|
-
</pre>
|
160
|
-
|
161
|
-
<h3>How do I prevent a portion of markup from being marked as code?</h3>
|
162
|
-
<p>You can use the <code>nocode</code> class to identify a span of markup
|
163
|
-
that is not code.
|
164
|
-
<pre class="prettyprint"><pre class=prettyprint>
|
165
|
-
int x = foo(); /* This is a comment <span class="nocode">This is not code</span>
|
166
|
-
Continuation of comment */
|
167
|
-
int y = bar();
|
168
|
-
</pre></pre>
|
169
|
-
produces
|
170
|
-
<pre class="prettyprint">
|
171
|
-
int x = foo(); /* This is a comment <span class="nocode">This is not code</span>
|
172
|
-
Continuation of comment */
|
173
|
-
int y = bar();
|
174
|
-
</pre>
|
175
|
-
|
176
|
-
<p>For a more complete example see the issue22
|
177
|
-
<a href="tests/prettify_test.html#issue22">testcase</a>.</p>
|
178
|
-
|
179
|
-
<h3>I get an error message "a is not a function" or "opt_whenDone is not a function"</h3>
|
180
|
-
<p>If you are calling <code>prettyPrint</code> via an event handler, wrap it in a function.
|
181
|
-
Instead of doing
|
182
|
-
<blockquote>
|
183
|
-
<code class="prettyprint lang-js"
|
184
|
-
>addEventListener('load', prettyPrint, false);</code>
|
185
|
-
</blockquote>
|
186
|
-
wrap it in a closure like
|
187
|
-
<blockquote>
|
188
|
-
<code class="prettyprint lang-js"
|
189
|
-
>addEventListener('load', function (event) { prettyPrint() }, false);</code>
|
190
|
-
</blockquote>
|
191
|
-
so that the browser does not pass an event object to <code>prettyPrint</code> which
|
192
|
-
will confuse it.
|
193
|
-
|
194
|
-
<br><br><br>
|
195
|
-
|
196
|
-
<div class="footer">
|
197
|
-
<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
|
198
|
-
<!-- hhmts start -->
|
199
|
-
Last modified: Wed Jul 19 13:56:00 PST 2010
|
200
|
-
<!-- hhmts end -->
|
201
|
-
</div>
|
202
|
-
</body>
|
203
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
@@ -1 +0,0 @@
|
|
1
|
-
window.PR_SHOULD_USE_CONTINUATION=true;var prettyPrintOne;var prettyPrint;(function(){var O=window;var j=["break,continue,do,else,for,if,return,while"];var v=[j,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var q=[v,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var m=[q,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var y=[q,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var T=[y,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"];var s="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes";var x=[q,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var t="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var J=[j,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var g=[j,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var I=[j,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var B=[m,T,x,t+J,g,I];var f=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/;var D="str";var A="kwd";var k="com";var Q="typ";var H="lit";var M="pun";var G="pln";var n="tag";var F="dec";var K="src";var R="atn";var o="atv";var P="nocode";var N="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function l(ab){var af=0;var U=false;var ae=false;for(var X=0,W=ab.length;X<W;++X){var ag=ab[X];if(ag.ignoreCase){ae=true}else{if(/[a-z]/i.test(ag.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){U=true;ae=false;break}}}var aa={b:8,t:9,n:10,v:11,f:12,r:13};function ad(aj){var ai=aj.charCodeAt(0);if(ai!==92){return ai}var ah=aj.charAt(1);ai=aa[ah];if(ai){return ai}else{if("0"<=ah&&ah<="7"){return parseInt(aj.substring(1),8)}else{if(ah==="u"||ah==="x"){return parseInt(aj.substring(2),16)}else{return aj.charCodeAt(1)}}}}function V(ah){if(ah<32){return(ah<16?"\\x0":"\\x")+ah.toString(16)}var ai=String.fromCharCode(ah);return(ai==="\\"||ai==="-"||ai==="]"||ai==="^")?"\\"+ai:ai}function Z(an){var ar=an.substring(1,an.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ah=[];var ap=ar[0]==="^";var ao=["["];if(ap){ao.push("^")}for(var at=ap?1:0,al=ar.length;at<al;++at){var aj=ar[at];if(/\\[bdsw]/i.test(aj)){ao.push(aj)}else{var ai=ad(aj);var am;if(at+2<al&&"-"===ar[at+1]){am=ad(ar[at+2]);at+=2}else{am=ai}ah.push([ai,am]);if(!(am<65||ai>122)){if(!(am<65||ai>90)){ah.push([Math.max(65,ai)|32,Math.min(am,90)|32])}if(!(am<97||ai>122)){ah.push([Math.max(97,ai)&~32,Math.min(am,122)&~32])}}}}ah.sort(function(aw,av){return(aw[0]-av[0])||(av[1]-aw[1])});var ak=[];var aq=[];for(var at=0;at<ah.length;++at){var au=ah[at];if(au[0]<=aq[1]+1){aq[1]=Math.max(aq[1],au[1])}else{ak.push(aq=au)}}for(var at=0;at<ak.length;++at){var au=ak[at];ao.push(V(au[0]));if(au[1]>au[0]){if(au[1]+1>au[0]){ao.push("-")}ao.push(V(au[1]))}}ao.push("]");return ao.join("")}function Y(an){var al=an.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var aj=al.length;var ap=[];for(var am=0,ao=0;am<aj;++am){var ai=al[am];if(ai==="("){++ao}else{if("\\"===ai.charAt(0)){var ah=+ai.substring(1);if(ah){if(ah<=ao){ap[ah]=-1}else{al[am]=V(ah)}}}}}for(var am=1;am<ap.length;++am){if(-1===ap[am]){ap[am]=++af}}for(var am=0,ao=0;am<aj;++am){var ai=al[am];if(ai==="("){++ao;if(!ap[ao]){al[am]="(?:"}}else{if("\\"===ai.charAt(0)){var ah=+ai.substring(1);if(ah&&ah<=ao){al[am]="\\"+ap[ah]}}}}for(var am=0;am<aj;++am){if("^"===al[am]&&"^"!==al[am+1]){al[am]=""}}if(an.ignoreCase&&U){for(var am=0;am<aj;++am){var ai=al[am];var ak=ai.charAt(0);if(ai.length>=2&&ak==="["){al[am]=Z(ai)}else{if(ak!=="\\"){al[am]=ai.replace(/[a-zA-Z]/g,function(aq){var ar=aq.charCodeAt(0);return"["+String.fromCharCode(ar&~32,ar|32)+"]"})}}}}return al.join("")}var ac=[];for(var X=0,W=ab.length;X<W;++X){var ag=ab[X];if(ag.global||ag.multiline){throw new Error(""+ag)}ac.push("(?:"+Y(ag)+")")}return new RegExp(ac.join("|"),ae?"gi":"g")}function b(aa,Y){var W=/(?:^|\s)nocode(?:\s|$)/;var ab=[];var Z=0;var X=[];var V=0;function U(ac){switch(ac.nodeType){case 1:if(W.test(ac.className)){return}for(var af=ac.firstChild;af;af=af.nextSibling){U(af)}var ae=ac.nodeName.toLowerCase();if("br"===ae||"li"===ae){ab[V]="\n";X[V<<1]=Z++;X[(V++<<1)|1]=ac}break;case 3:case 4:var ad=ac.nodeValue;if(ad.length){if(!Y){ad=ad.replace(/[ \t\r\n]+/g," ")}else{ad=ad.replace(/\r\n?/g,"\n")}ab[V]=ad;X[V<<1]=Z;Z+=ad.length;X[(V++<<1)|1]=ac}break}}U(aa);return{sourceCode:ab.join("").replace(/\n$/,""),spans:X}}function C(U,W,Y,V){if(!W){return}var X={sourceCode:W,basePos:U};Y(X);V.push.apply(V,X.decorations)}var w=/\S/;function p(U){var X=undefined;for(var W=U.firstChild;W;W=W.nextSibling){var V=W.nodeType;X=(V===1)?(X?U:W):(V===3)?(w.test(W.nodeValue)?U:X):X}return X===U?undefined:X}function h(W,V){var U={};var X;(function(){var af=W.concat(V);var aj=[];var ai={};for(var ad=0,ab=af.length;ad<ab;++ad){var aa=af[ad];var ae=aa[3];if(ae){for(var ag=ae.length;--ag>=0;){U[ae.charAt(ag)]=aa}}var ah=aa[1];var ac=""+ah;if(!ai.hasOwnProperty(ac)){aj.push(ah);ai[ac]=null}}aj.push(/[\0-\uffff]/);X=l(aj)})();var Z=V.length;var Y=function(aj){var ab=aj.sourceCode,aa=aj.basePos;var af=[aa,G];var ah=0;var ap=ab.match(X)||[];var al={};for(var ag=0,at=ap.length;ag<at;++ag){var ai=ap[ag];var ar=al[ai];var ak=void 0;var ao;if(typeof ar==="string"){ao=false}else{var ac=U[ai.charAt(0)];if(ac){ak=ai.match(ac[1]);ar=ac[0]}else{for(var aq=0;aq<Z;++aq){ac=V[aq];ak=ai.match(ac[1]);if(ak){ar=ac[0];break}}if(!ak){ar=G}}ao=ar.length>=5&&"lang-"===ar.substring(0,5);if(ao&&!(ak&&typeof ak[1]==="string")){ao=false;ar=K}if(!ao){al[ai]=ar}}var ad=ah;ah+=ai.length;if(!ao){af.push(aa+ad,ar)}else{var an=ak[1];var am=ai.indexOf(an);var ae=am+an.length;if(ak[2]){ae=ai.length-ak[2].length;am=ae-an.length}var au=ar.substring(5);C(aa+ad,ai.substring(0,am),Y,af);C(aa+ad+am,an,r(au,an),af);C(aa+ad+ae,ai.substring(ae),Y,af)}}aj.decorations=af};return Y}function i(V){var Y=[],U=[];if(V.tripleQuotedStrings){Y.push([D,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(V.multiLineStrings){Y.push([D,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{Y.push([D,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(V.verbatimStrings){U.push([D,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var ab=V.hashComments;if(ab){if(V.cStyleComments){if(ab>1){Y.push([k,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{Y.push([k,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}U.push([D,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])}else{Y.push([k,/^#[^\r\n]*/,null,"#"])}}if(V.cStyleComments){U.push([k,/^\/\/[^\r\n]*/,null]);U.push([k,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(V.regexLiterals){var aa=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");U.push(["lang-regex",new RegExp("^"+N+"("+aa+")")])}var X=V.types;if(X){U.push([Q,X])}var W=(""+V.keywords).replace(/^ | $/g,"");if(W.length){U.push([A,new RegExp("^(?:"+W.replace(/[\s,]+/g,"|")+")\\b"),null])}Y.push([G,/^\s+/,null," \r\n\t\xA0"]);var Z=/^.[^\s\w\.$@\'\"\`\/\\]*/;U.push([H,/^@[a-z_$][a-z_$@0-9]*/i,null],[Q,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[G,/^[a-z_$][a-z_$@0-9]*/i,null],[H,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[G,/^\\[\s\S]?/,null],[M,Z,null]);return h(Y,U)}var L=i({keywords:B,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function S(W,ah,aa){var V=/(?:^|\s)nocode(?:\s|$)/;var ac=/\r\n?|\n/;var ad=W.ownerDocument;var ag=ad.createElement("li");while(W.firstChild){ag.appendChild(W.firstChild)}var X=[ag];function af(am){switch(am.nodeType){case 1:if(V.test(am.className)){break}if("br"===am.nodeName){ae(am);if(am.parentNode){am.parentNode.removeChild(am)}}else{for(var ao=am.firstChild;ao;ao=ao.nextSibling){af(ao)}}break;case 3:case 4:if(aa){var an=am.nodeValue;var ak=an.match(ac);if(ak){var aj=an.substring(0,ak.index);am.nodeValue=aj;var ai=an.substring(ak.index+ak[0].length);if(ai){var al=am.parentNode;al.insertBefore(ad.createTextNode(ai),am.nextSibling)}ae(am);if(!aj){am.parentNode.removeChild(am)}}}break}}function ae(al){while(!al.nextSibling){al=al.parentNode;if(!al){return}}function aj(am,at){var ar=at?am.cloneNode(false):am;var ap=am.parentNode;if(ap){var aq=aj(ap,1);var ao=am.nextSibling;aq.appendChild(ar);for(var an=ao;an;an=ao){ao=an.nextSibling;aq.appendChild(an)}}return ar}var ai=aj(al.nextSibling,0);for(var ak;(ak=ai.parentNode)&&ak.nodeType===1;){ai=ak}X.push(ai)}for(var Z=0;Z<X.length;++Z){af(X[Z])}if(ah===(ah|0)){X[0].setAttribute("value",ah)}var ab=ad.createElement("ol");ab.className="linenums";var Y=Math.max(0,((ah-1))|0)||0;for(var Z=0,U=X.length;Z<U;++Z){ag=X[Z];ag.className="L"+((Z+Y)%10);if(!ag.firstChild){ag.appendChild(ad.createTextNode("\xA0"))}ab.appendChild(ag)}W.appendChild(ab)}function E(af){var X=/\bMSIE\s(\d+)/.exec(navigator.userAgent);X=X&&+X[1]<=8;var ao=/\n/g;var an=af.sourceCode;var ap=an.length;var Y=0;var ad=af.spans;var V=ad.length;var aj=0;var aa=af.decorations;var ab=aa.length;var ac=0;aa[ab]=ap;var av,at;for(at=av=0;at<ab;){if(aa[at]!==aa[at+2]){aa[av++]=aa[at++];aa[av++]=aa[at++]}else{at+=2}}ab=av;for(at=av=0;at<ab;){var aw=aa[at];var ae=aa[at+1];var Z=at+2;while(Z+2<=ab&&aa[Z+1]===ae){Z+=2}aa[av++]=aw;aa[av++]=ae;at=Z}ab=aa.length=av;var au=af.sourceNode;var ak;if(au){ak=au.style.display;au.style.display="none"}try{var ah=null;while(aj<V){var ai=ad[aj];var U=ad[aj+2]||ap;var ar=aa[ac+2]||ap;var Z=Math.min(U,ar);var am=ad[aj+1];var W;if(am.nodeType!==1&&(W=an.substring(Y,Z))){if(X){W=W.replace(ao,"\r")}am.nodeValue=W;var al=am.ownerDocument;var aq=al.createElement("span");aq.className=aa[ac+1];var ag=am.parentNode;ag.replaceChild(aq,am);aq.appendChild(am);if(Y<U){ad[aj+1]=am=al.createTextNode(an.substring(Z,U));ag.insertBefore(am,aq.nextSibling)}}Y=Z;if(Y>=U){aj+=2}if(Y>=ar){ac+=2}}}finally{if(au){au.style.display=ak}}}var u={};function d(W,X){for(var U=X.length;--U>=0;){var V=X[U];if(!u.hasOwnProperty(V)){u[V]=W}else{if(O.console){console.warn("cannot override language handler %s",V)}}}}function r(V,U){if(!(V&&u.hasOwnProperty(V))){V=/^\s*</.test(U)?"default-markup":"default-code"}return u[V]}d(L,["default-code"]);d(h([],[[G,/^[^<?]+/],[F,/^<!\w[^>]*(?:>|$)/],[k,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[M,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);d(h([[G,/^[\s]+/,null," \t\r\n"],[o,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[n,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[M,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);d(h([],[[o,/^[\s\S]+/]]),["uq.val"]);d(i({keywords:m,hashComments:true,cStyleComments:true,types:f}),["c","cc","cpp","cxx","cyc","m"]);d(i({keywords:"null,true,false"}),["json"]);d(i({keywords:T,hashComments:true,cStyleComments:true,verbatimStrings:true,types:f}),["cs"]);d(i({keywords:y,cStyleComments:true}),["java"]);d(i({keywords:I,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);d(i({keywords:J,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);d(i({keywords:t,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);d(i({keywords:g,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);d(i({keywords:x,cStyleComments:true,regexLiterals:true}),["js"]);d(i({keywords:s,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);d(h([],[[D,/^[\s\S]+/]]),["regex"]);function e(X){var W=X.langExtension;try{var U=b(X.sourceNode,X.pre);var V=U.sourceCode;X.sourceCode=V;X.spans=U.spans;X.basePos=0;r(W,V)(X);E(X)}catch(Y){if(O.console){console.log(Y&&Y.stack?Y.stack:Y)}}}function z(Y,X,W){var U=document.createElement("pre");U.innerHTML=Y;if(W){S(U,W,true)}var V={langExtension:X,numberLines:W,sourceNode:U,pre:1};e(V);return U.innerHTML}function c(aj){function ab(al){return document.getElementsByTagName(al)}var ah=[ab("pre"),ab("code"),ab("xmp")];var V=[];for(var ae=0;ae<ah.length;++ae){for(var ac=0,Y=ah[ae].length;ac<Y;++ac){V.push(ah[ae][ac])}}ah=null;var Z=Date;if(!Z.now){Z={now:function(){return +(new Date)}}}var aa=0;var U;var af=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ak=/\bprettyprint\b/;var W=/\bprettyprinted\b/;var ag=/pre|xmp/i;var ai=/^code$/i;var ad=/^(?:pre|code|xmp)$/i;function X(){var ar=(O.PR_SHOULD_USE_CONTINUATION?Z.now()+250:Infinity);for(;aa<V.length&&Z.now()<ar;aa++){var at=V[aa];var au=at.className;if(ak.test(au)&&!W.test(au)){var aw=false;for(var ao=at.parentNode;ao;ao=ao.parentNode){var ax=ao.tagName;if(ad.test(ax)&&ao.className&&ak.test(ao.className)){aw=true;break}}if(!aw){at.className+=" prettyprinted";var aq=au.match(af);var am;if(!aq&&(am=p(at))&&ai.test(am.tagName)){aq=am.className.match(af)}if(aq){aq=aq[1]}var ap;if(ag.test(at.tagName)){ap=1}else{var an=at.currentStyle;var al=(an?an.whiteSpace:(document.defaultView&&document.defaultView.getComputedStyle)?document.defaultView.getComputedStyle(at,null).getPropertyValue("white-space"):0);ap=al&&"pre"===al.substring(0,3)}var av=at.className.match(/\blinenums\b(?::(\d+))?/);av=av?av[1]&&av[1].length?+av[1]:true:false;if(av){S(at,av,ap)}U={langExtension:aq,sourceNode:at,numberLines:av,pre:ap};e(U)}}}if(aa<V.length){setTimeout(X,250)}else{if(aj){aj()}}}X()}var a=O.PR={createSimpleLexer:h,registerLangHandler:d,sourceDecorator:i,PR_ATTRIB_NAME:R,PR_ATTRIB_VALUE:o,PR_COMMENT:k,PR_DECLARATION:F,PR_KEYWORD:A,PR_LITERAL:H,PR_NOCODE:P,PR_PLAIN:G,PR_PUNCTUATION:M,PR_SOURCE:K,PR_STRING:D,PR_TAG:n,PR_TYPE:Q,prettyPrintOne:O.prettyPrintOne=z,prettyPrint:O.prettyPrint=c};if(typeof define==="function"&&define.amd){define("google-code-prettify",[],function(){return a})}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]);
|
@@ -1,54 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en" class="yui-overrride">
|
3
|
-
<head>
|
4
|
-
<meta charset="utf-8">
|
5
|
-
<title>{{htmlTitle}}</title>
|
6
|
-
<link rel="stylesheet" href="{{yuiGridsUrl}}">
|
7
|
-
<link rel="stylesheet" href="{{projectAssets}}/vendor/prettify/prettify-min.css">
|
8
|
-
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700' rel='stylesheet' type='text/css'>
|
9
|
-
<link rel="shortcut icon" type="image/png" href="{{projectAssets}}/favicon.png">
|
10
|
-
<script src="{{yuiSeedUrl}}"></script>
|
11
|
-
<link rel="stylesheet" href="{{projectAssets}}/css/main.css" id="site_styles">
|
12
|
-
</head>
|
13
|
-
<body class="yui3-skin-sam">
|
14
|
-
|
15
|
-
<div id="doc">
|
16
|
-
<div id="hd" class="yui3-g header">
|
17
|
-
<div class="yui3-u-3-4">
|
18
|
-
<h1 class="blue-main-title">{{projectName}}</h1>
|
19
|
-
</div>
|
20
|
-
<div class="yui3-u-1-4 version project-version">
|
21
|
-
API Docs for: {{projectVersion}}
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<div id="bd" class="yui3-g">
|
25
|
-
|
26
|
-
<div class="yui3-u-1-4">
|
27
|
-
<div id="docs-sidebar" class="sidebar apidocs">
|
28
|
-
{{>sidebar}}
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<div class="yui3-u-3-4">
|
32
|
-
{{>options}}
|
33
|
-
<div class="apidocs">
|
34
|
-
<div id="docs-main">
|
35
|
-
<div class="content">
|
36
|
-
{{>layout_content}}
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
</div>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
<script src="{{projectAssets}}/vendor/prettify/prettify-min.js"></script>
|
44
|
-
<script>
|
45
|
-
</script>
|
46
|
-
<script>prettyPrint();</script>
|
47
|
-
<script src="{{projectAssets}}/js/yui-prettify.js"></script>
|
48
|
-
<script src="{{projectAssets}}/../api.js"></script>
|
49
|
-
<script src="{{projectAssets}}/js/api-filter.js"></script>
|
50
|
-
<script src="{{projectAssets}}/js/api-list.js"></script>
|
51
|
-
<script src="{{projectAssets}}/js/api-search.js"></script>
|
52
|
-
<script src="{{projectAssets}}/js/apidocs.js"></script>
|
53
|
-
</body>
|
54
|
-
</html>
|
data/doc/theme/package.json
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "yuidoc-theme-blue",
|
3
|
-
"version": "0.1.8",
|
4
|
-
"description": "A custom theme for yuidocs inspired by the blue color :)",
|
5
|
-
"repository": {
|
6
|
-
"type": "git",
|
7
|
-
"url": "git://github.com/royriojas/yuidoc-theme-blue.git"
|
8
|
-
},
|
9
|
-
"keywords": [
|
10
|
-
"yuidoc-theme",
|
11
|
-
"code documentation",
|
12
|
-
"documentation generator",
|
13
|
-
"themes",
|
14
|
-
"yuidoc themes"
|
15
|
-
],
|
16
|
-
"author": {
|
17
|
-
"name": "Roy Riojas"
|
18
|
-
},
|
19
|
-
"license": "MIT",
|
20
|
-
"bugs": {
|
21
|
-
"url": "https://github.com/royriojas/yuidoc-theme-blue/issues"
|
22
|
-
},
|
23
|
-
"devDependencies": {
|
24
|
-
"grunt": "~0.4.2",
|
25
|
-
"grunt-bump": "0.0.13",
|
26
|
-
"time-grunt": "~0.2.8",
|
27
|
-
"matchdep": "~0.3.0",
|
28
|
-
"grunt-jsbeautifier": "git://github.com/royriojas/grunt-jsbeautifier",
|
29
|
-
"yuidocjs": "git://github.com/royriojas/yuidoc"
|
30
|
-
},
|
31
|
-
"_id": "yuidoc-theme-blue@0.1.8",
|
32
|
-
"dist": {
|
33
|
-
"shasum": "5a508ccee52e7845e01439937212de5a519af626",
|
34
|
-
"tarball": "http://registry.npmjs.org/yuidoc-theme-blue/-/yuidoc-theme-blue-0.1.8.tgz"
|
35
|
-
},
|
36
|
-
"_from": "yuidoc-theme-blue@",
|
37
|
-
"_npmVersion": "1.3.8",
|
38
|
-
"_npmUser": {
|
39
|
-
"name": "royriojas",
|
40
|
-
"email": "royriojas@gmail.com"
|
41
|
-
},
|
42
|
-
"maintainers": [
|
43
|
-
{
|
44
|
-
"name": "royriojas",
|
45
|
-
"email": "royriojas@gmail.com"
|
46
|
-
}
|
47
|
-
],
|
48
|
-
"directories": {},
|
49
|
-
"_shasum": "5a508ccee52e7845e01439937212de5a519af626",
|
50
|
-
"_resolved": "https://registry.npmjs.org/yuidoc-theme-blue/-/yuidoc-theme-blue-0.1.8.tgz",
|
51
|
-
"readme": "ERROR: No README data found!",
|
52
|
-
"homepage": "https://github.com/royriojas/yuidoc-theme-blue"
|
53
|
-
}
|