patternfly-sass 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bowerrc +1 -1
- data/.gitignore +2 -4
- data/.travis.yml +6 -3
- data/README.md +187 -26
- data/Rakefile +21 -17
- data/assets/stylesheets/patternfly/_variables.scss +206 -206
- data/bower.json +11 -12
- data/lib/patternfly-sass/version.rb +2 -2
- data/patternfly-sass.gemspec +1 -1
- data/{tests → spec}/capture.js +0 -0
- data/spec/compare_spec.rb +15 -5
- data/{tests/patternfly → spec/html}/accordions.html +0 -0
- data/{tests/patternfly → spec/html}/alerts.html +0 -0
- data/{tests/patternfly → spec/html}/badges.html +0 -0
- data/{tests/patternfly → spec/html}/basic.html +0 -0
- data/{tests/patternfly → spec/html}/blank-slate.html +0 -0
- data/{tests/patternfly → spec/html}/bootstrap-combobox.html +0 -0
- data/{tests/patternfly → spec/html}/bootstrap-select.html +0 -0
- data/{tests/patternfly → spec/html}/bootstrap-treeview-2.html +0 -0
- data/{tests/patternfly → spec/html}/bootstrap-treeview.html +0 -0
- data/{tests/patternfly → spec/html}/breadcrumbs.html +0 -0
- data/{tests/patternfly → spec/html}/buttons.html +0 -0
- data/{tests/patternfly → spec/html}/code.html +0 -0
- data/{tests/patternfly → spec/html}/dashboard.html +0 -0
- data/{tests/patternfly → spec/html}/datatables-columns.html +0 -0
- data/{tests/patternfly → spec/html}/datatables.html +0 -0
- data/{tests/patternfly → spec/html}/dist/css/patternfly.css +0 -0
- data/{tests/patternfly → spec/html}/dist/css/patternfly.min.css +0 -0
- data/{tests/patternfly → spec/html}/dist/css/styles.css +0 -0
- data/{tests/patternfly → spec/html}/dist/css/styles.min.css +0 -0
- data/{tests/patternfly → spec/html}/dropdowns.html +0 -0
- data/{tests/patternfly → spec/html}/form.html +0 -0
- data/{tests/patternfly → spec/html}/forms.html +0 -0
- data/{tests/patternfly → spec/html}/icons.html +0 -0
- data/{tests/patternfly → spec/html}/img/dashboard-1.png +0 -0
- data/{tests/patternfly → spec/html}/img/dashboard-2.png +0 -0
- data/{tests/patternfly → spec/html}/img/dashboard-3.png +0 -0
- data/{tests/patternfly → spec/html}/img/dashboard-4.png +0 -0
- data/{tests/patternfly → spec/html}/index.html +0 -0
- data/{tests/patternfly → spec/html}/infotip.html +0 -0
- data/{tests/patternfly → spec/html}/labels.html +0 -0
- data/{tests/patternfly → spec/html}/list-group.html +0 -0
- data/{tests/patternfly → spec/html}/login.html +0 -0
- data/{tests/index.html → spec/html/main.html} +0 -0
- data/{tests/patternfly → spec/html}/modals.html +0 -0
- data/{tests/patternfly → spec/html}/navbar.html +0 -0
- data/{tests/patternfly → spec/html}/pagination.html +0 -0
- data/{tests/patternfly → spec/html}/panels.html +0 -0
- data/{tests/patternfly → spec/html}/popovers.html +0 -0
- data/{tests/patternfly → spec/html}/progress-bars.html +0 -0
- data/{tests/patternfly → spec/html}/search.html +0 -0
- data/{tests/patternfly → spec/html}/spinner.html +0 -0
- data/{tests/patternfly → spec/html}/tab.html +0 -0
- data/{tests/patternfly → spec/html}/tables.html +0 -0
- data/{tests/patternfly → spec/html}/tabs.html +0 -0
- data/{tests/patternfly → spec/html}/tests.css +0 -0
- data/{tests/patternfly → spec/html}/tooltip.html +0 -0
- data/{tests/patternfly → spec/html}/typography-2.css +0 -0
- data/{tests/patternfly → spec/html}/typography-2.html +0 -0
- data/{tests/patternfly → spec/html}/typography.html +0 -0
- data/tasks/converter.rb +6 -9
- metadata +103 -626
- data/package.json +0 -28
- data/tests/components/bootstrap-combobox/.bower.json +0 -14
- data/tests/components/bootstrap-combobox/.gitignore +0 -1
- data/tests/components/bootstrap-combobox/README.md +0 -59
- data/tests/components/bootstrap-combobox/css/bootstrap-combobox.css +0 -42
- data/tests/components/bootstrap-combobox/js/bootstrap-combobox.js +0 -438
- data/tests/components/bootstrap-combobox/js/tests/index.html +0 -29
- data/tests/components/bootstrap-combobox/js/tests/unit/bootstrap-combobox.js +0 -323
- data/tests/components/bootstrap-combobox/js/tests/vendor/jquery.js +0 -9597
- data/tests/components/bootstrap-combobox/js/tests/vendor/qunit.css +0 -244
- data/tests/components/bootstrap-combobox/js/tests/vendor/qunit.js +0 -2152
- data/tests/components/bootstrap-combobox/less/combobox.less +0 -55
- data/tests/components/bootstrap-select/.bower.json +0 -38
- data/tests/components/bootstrap-select/CONTRIBUTING.md +0 -87
- data/tests/components/bootstrap-select/README.md +0 -61
- data/tests/components/bootstrap-select/bootstrap-select.css +0 -309
- data/tests/components/bootstrap-select/bootstrap-select.jquery.json +0 -29
- data/tests/components/bootstrap-select/bootstrap-select.js +0 -972
- data/tests/components/bootstrap-select/bootstrap-select.min.css +0 -7
- data/tests/components/bootstrap-select/bootstrap-select.min.js +0 -8
- data/tests/components/bootstrap-select/bower.json +0 -29
- data/tests/components/bootstrap-select/composer.json +0 -17
- data/tests/components/bootstrap-select/i18n/defaults-cs-CZ.js +0 -29
- data/tests/components/bootstrap-select/i18n/defaults-cz-CZ.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-de_DE.js +0 -29
- data/tests/components/bootstrap-select/i18n/defaults-de_DE.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-es-CL.js +0 -29
- data/tests/components/bootstrap-select/i18n/defaults-es-CL.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-eu.js +0 -30
- data/tests/components/bootstrap-select/i18n/defaults-eu.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-it_IT.js +0 -32
- data/tests/components/bootstrap-select/i18n/defaults-it_IT.min.js +0 -1
- data/tests/components/bootstrap-select/i18n/defaults-nl_NL.js +0 -32
- data/tests/components/bootstrap-select/i18n/defaults-nl_NL.min.js +0 -7
- data/tests/components/bootstrap-select/i18n/defaults-pl_PL.js +0 -29
- data/tests/components/bootstrap-select/i18n/defaults-pl_PL.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-pt_BR.js +0 -33
- data/tests/components/bootstrap-select/i18n/defaults-pt_BR.min.js +0 -7
- data/tests/components/bootstrap-select/i18n/defaults-ru-RU.js +0 -31
- data/tests/components/bootstrap-select/i18n/defaults-ru_RU.min.js +0 -6
- data/tests/components/bootstrap-select/i18n/defaults-zh_CN.js +0 -30
- data/tests/components/bootstrap-select/i18n/defaults-zh_CN.min.js +0 -6
- data/tests/components/bootstrap-select/package.json +0 -31
- data/tests/components/bootstrap-select/test.html +0 -62
- data/tests/components/bootstrap-treeview/.bower.json +0 -38
- data/tests/components/bootstrap-treeview/Gruntfile.js +0 -62
- data/tests/components/bootstrap-treeview/LICENSE +0 -202
- data/tests/components/bootstrap-treeview/README.md +0 -289
- data/tests/components/bootstrap-treeview/app.js +0 -29
- data/tests/components/bootstrap-treeview/bower.json +0 -29
- data/tests/components/bootstrap-treeview/dist/bootstrap-treeview.min.css +0 -1
- data/tests/components/bootstrap-treeview/dist/bootstrap-treeview.min.js +0 -1
- data/tests/components/bootstrap-treeview/package.json +0 -18
- data/tests/components/bootstrap-treeview/public/css/bootstrap-treeview.css +0 -37
- data/tests/components/bootstrap-treeview/public/example-dom.html +0 -59
- data/tests/components/bootstrap-treeview/public/index.html +0 -333
- data/tests/components/bootstrap-treeview/public/js/bootstrap-treeview.js +0 -455
- data/tests/components/bootstrap-treeview/screenshot/default.PNG +0 -0
- data/tests/components/bootstrap-treeview/src/css/bootstrap-treeview.css +0 -37
- data/tests/components/bootstrap-treeview/src/js/bootstrap-treeview.js +0 -455
- data/tests/components/datatables-colreorder/.bower.json +0 -22
- data/tests/components/datatables-colreorder/License.txt +0 -20
- data/tests/components/datatables-colreorder/Readme.md +0 -39
- data/tests/components/datatables-colreorder/bower.json +0 -12
- data/tests/components/datatables-colreorder/css/dataTables.colReorder.css +0 -14
- data/tests/components/datatables-colreorder/examples/alt_insert.xml +0 -30
- data/tests/components/datatables-colreorder/examples/col_filter.xml +0 -38
- data/tests/components/datatables-colreorder/examples/colvis.xml +0 -26
- data/tests/components/datatables-colreorder/examples/fixedcolumns.xml +0 -43
- data/tests/components/datatables-colreorder/examples/fixedheader.xml +0 -27
- data/tests/components/datatables-colreorder/examples/index.xml +0 -19
- data/tests/components/datatables-colreorder/examples/jqueryui.xml +0 -27
- data/tests/components/datatables-colreorder/examples/new_init.xml +0 -23
- data/tests/components/datatables-colreorder/examples/predefined.xml +0 -30
- data/tests/components/datatables-colreorder/examples/realtime.xml +0 -30
- data/tests/components/datatables-colreorder/examples/reset.xml +0 -41
- data/tests/components/datatables-colreorder/examples/scrolling.xml +0 -27
- data/tests/components/datatables-colreorder/examples/server_side.xml +0 -38
- data/tests/components/datatables-colreorder/examples/simple.xml +0 -25
- data/tests/components/datatables-colreorder/examples/state_save.xml +0 -26
- data/tests/components/datatables-colreorder/images/.DS_Store +0 -0
- data/tests/components/datatables-colreorder/images/insert.png +0 -0
- data/tests/components/datatables-colreorder/js/dataTables.colReorder.js +0 -1372
- data/tests/components/datatables-colreorder/make.sh +0 -31
- data/tests/components/datatables-colvis/.bower.json +0 -22
- data/tests/components/datatables-colvis/License.txt +0 -20
- data/tests/components/datatables-colvis/README.md +0 -38
- data/tests/components/datatables-colvis/bower.json +0 -12
- data/tests/components/datatables-colvis/css/dataTables.colVis.css +0 -185
- data/tests/components/datatables-colvis/css/dataTables.colvis.jqueryui.css +0 -41
- data/tests/components/datatables-colvis/examples/.DS_Store +0 -0
- data/tests/components/datatables-colvis/examples/button_order.xml +0 -26
- data/tests/components/datatables-colvis/examples/exclude_columns.xml +0 -28
- data/tests/components/datatables-colvis/examples/group_columns.xml +0 -40
- data/tests/components/datatables-colvis/examples/index.xml +0 -18
- data/tests/components/datatables-colvis/examples/jqueryui.xml +0 -28
- data/tests/components/datatables-colvis/examples/mouseover.xml +0 -28
- data/tests/components/datatables-colvis/examples/new_init.xml +0 -26
- data/tests/components/datatables-colvis/examples/restore.xml +0 -33
- data/tests/components/datatables-colvis/examples/simple.xml +0 -25
- data/tests/components/datatables-colvis/examples/text.xml +0 -29
- data/tests/components/datatables-colvis/examples/title_callback.xml +0 -30
- data/tests/components/datatables-colvis/examples/two_tables.xml +0 -24
- data/tests/components/datatables-colvis/examples/two_tables_identical.xml +0 -35
- data/tests/components/datatables-colvis/js/dataTables.colVis.js +0 -1123
- data/tests/components/datatables-colvis/make.sh +0 -28
- data/tests/components/datatables/.bower.json +0 -42
- data/tests/components/datatables/Contributing.md +0 -18
- data/tests/components/datatables/Readme.md +0 -53
- data/tests/components/datatables/bower.json +0 -32
- data/tests/components/datatables/license.txt +0 -20
- data/tests/components/datatables/media/css/jquery.dataTables.css +0 -455
- data/tests/components/datatables/media/css/jquery.dataTables.min.css +0 -1
- data/tests/components/datatables/media/css/jquery.dataTables_themeroller.css +0 -416
- data/tests/components/datatables/media/images/Sorting icons.psd +0 -0
- data/tests/components/datatables/media/images/favicon.ico +0 -0
- data/tests/components/datatables/media/images/sort_asc.png +0 -0
- data/tests/components/datatables/media/images/sort_asc_disabled.png +0 -0
- data/tests/components/datatables/media/images/sort_both.png +0 -0
- data/tests/components/datatables/media/images/sort_desc.png +0 -0
- data/tests/components/datatables/media/images/sort_desc_disabled.png +0 -0
- data/tests/components/datatables/media/js/jquery.dataTables.js +0 -14951
- data/tests/components/datatables/media/js/jquery.dataTables.min.js +0 -160
- data/tests/components/datatables/media/js/jquery.js +0 -5
- data/tests/components/google-code-prettify/.bower.json +0 -26
- data/tests/components/google-code-prettify/CHANGES.html +0 -172
- data/tests/components/google-code-prettify/COPYING +0 -191
- data/tests/components/google-code-prettify/README-zh-Hans.html +0 -143
- data/tests/components/google-code-prettify/README.html +0 -233
- data/tests/components/google-code-prettify/README.md +0 -54
- data/tests/components/google-code-prettify/bin/prettify.min.css +0 -1
- data/tests/components/google-code-prettify/bin/prettify.min.js +0 -30
- data/tests/components/google-code-prettify/bin/run_prettify.min.js +0 -34
- data/tests/components/google-code-prettify/bower.json +0 -16
- data/tests/components/google-code-prettify/examples/quine.html +0 -55
- data/tests/components/google-code-prettify/src/lang-apollo.js +0 -51
- data/tests/components/google-code-prettify/src/lang-basic.js +0 -32
- data/tests/components/google-code-prettify/src/lang-clj.js +0 -64
- data/tests/components/google-code-prettify/src/lang-css.js +0 -159
- data/tests/components/google-code-prettify/src/lang-dart.js +0 -88
- data/tests/components/google-code-prettify/src/lang-erlang.js +0 -92
- data/tests/components/google-code-prettify/src/lang-go.js +0 -58
- data/tests/components/google-code-prettify/src/lang-hs.js +0 -101
- data/tests/components/google-code-prettify/src/lang-lisp.js +0 -94
- data/tests/components/google-code-prettify/src/lang-llvm.js +0 -61
- data/tests/components/google-code-prettify/src/lang-lua.js +0 -59
- data/tests/components/google-code-prettify/src/lang-matlab.js +0 -180
- data/tests/components/google-code-prettify/src/lang-ml.js +0 -56
- data/tests/components/google-code-prettify/src/lang-mumps.js +0 -139
- data/tests/components/google-code-prettify/src/lang-n.js +0 -65
- data/tests/components/google-code-prettify/src/lang-pascal.js +0 -32
- data/tests/components/google-code-prettify/src/lang-proto.js +0 -35
- data/tests/components/google-code-prettify/src/lang-r.js +0 -57
- data/tests/components/google-code-prettify/src/lang-rd.js +0 -47
- data/tests/components/google-code-prettify/src/lang-scala.js +0 -54
- data/tests/components/google-code-prettify/src/lang-sql.js +0 -58
- data/tests/components/google-code-prettify/src/lang-tcl.js +0 -62
- data/tests/components/google-code-prettify/src/lang-tex.js +0 -46
- data/tests/components/google-code-prettify/src/lang-vb.js +0 -66
- data/tests/components/google-code-prettify/src/lang-vhdl.js +0 -34
- data/tests/components/google-code-prettify/src/lang-wiki.js +0 -53
- data/tests/components/google-code-prettify/src/lang-xq.js +0 -67
- data/tests/components/google-code-prettify/src/lang-yaml.js +0 -27
- data/tests/components/google-code-prettify/src/prettify.css +0 -52
- data/tests/components/google-code-prettify/src/prettify.js +0 -1655
- data/tests/components/google-code-prettify/src/run_prettify.js +0 -1905
- data/tests/components/google-code-prettify/styles/demo.html +0 -61
- data/tests/components/google-code-prettify/styles/desert.css +0 -34
- data/tests/components/google-code-prettify/styles/doxy.css +0 -64
- data/tests/components/google-code-prettify/styles/index.html +0 -89
- data/tests/components/google-code-prettify/styles/sons-of-obsidian.css +0 -118
- data/tests/components/google-code-prettify/styles/sunburst.css +0 -51
- data/tests/components/jquery/.bower.json +0 -38
- data/tests/components/jquery/MIT-LICENSE.txt +0 -21
- data/tests/components/jquery/bower.json +0 -28
- data/tests/components/jquery/dist/jquery.js +0 -9210
- data/tests/components/jquery/dist/jquery.min.js +0 -5
- data/tests/components/jquery/dist/jquery.min.map +0 -1
- data/tests/components/jquery/src/ajax.js +0 -786
- data/tests/components/jquery/src/ajax/jsonp.js +0 -89
- data/tests/components/jquery/src/ajax/load.js +0 -75
- data/tests/components/jquery/src/ajax/parseJSON.js +0 -13
- data/tests/components/jquery/src/ajax/parseXML.js +0 -28
- data/tests/components/jquery/src/ajax/script.js +0 -64
- data/tests/components/jquery/src/ajax/var/nonce.js +0 -5
- data/tests/components/jquery/src/ajax/var/rquery.js +0 -3
- data/tests/components/jquery/src/ajax/xhr.js +0 -136
- data/tests/components/jquery/src/attributes.js +0 -11
- data/tests/components/jquery/src/attributes/attr.js +0 -141
- data/tests/components/jquery/src/attributes/classes.js +0 -158
- data/tests/components/jquery/src/attributes/prop.js +0 -94
- data/tests/components/jquery/src/attributes/support.js +0 -35
- data/tests/components/jquery/src/attributes/val.js +0 -161
- data/tests/components/jquery/src/callbacks.js +0 -205
- data/tests/components/jquery/src/core.js +0 -502
- data/tests/components/jquery/src/core/access.js +0 -60
- data/tests/components/jquery/src/core/init.js +0 -123
- data/tests/components/jquery/src/core/parseHTML.js +0 -39
- data/tests/components/jquery/src/core/ready.js +0 -97
- data/tests/components/jquery/src/core/var/rsingleTag.js +0 -4
- data/tests/components/jquery/src/css.js +0 -450
- data/tests/components/jquery/src/css/addGetHookIf.js +0 -22
- data/tests/components/jquery/src/css/curCSS.js +0 -57
- data/tests/components/jquery/src/css/defaultDisplay.js +0 -70
- data/tests/components/jquery/src/css/hiddenVisibleSelectors.js +0 -15
- data/tests/components/jquery/src/css/support.js +0 -96
- data/tests/components/jquery/src/css/swap.js +0 -28
- data/tests/components/jquery/src/css/var/cssExpand.js +0 -3
- data/tests/components/jquery/src/css/var/getStyles.js +0 -12
- data/tests/components/jquery/src/css/var/isHidden.js +0 -13
- data/tests/components/jquery/src/css/var/rmargin.js +0 -3
- data/tests/components/jquery/src/css/var/rnumnonpx.js +0 -5
- data/tests/components/jquery/src/data.js +0 -178
- data/tests/components/jquery/src/data/Data.js +0 -181
- data/tests/components/jquery/src/data/accepts.js +0 -20
- data/tests/components/jquery/src/data/var/data_priv.js +0 -5
- data/tests/components/jquery/src/data/var/data_user.js +0 -5
- data/tests/components/jquery/src/deferred.js +0 -149
- data/tests/components/jquery/src/deprecated.js +0 -13
- data/tests/components/jquery/src/dimensions.js +0 -50
- data/tests/components/jquery/src/effects.js +0 -648
- data/tests/components/jquery/src/effects/Tween.js +0 -114
- data/tests/components/jquery/src/effects/animatedSelector.js +0 -13
- data/tests/components/jquery/src/event.js +0 -868
- data/tests/components/jquery/src/event/ajax.js +0 -13
- data/tests/components/jquery/src/event/alias.js +0 -39
- data/tests/components/jquery/src/event/support.js +0 -9
- data/tests/components/jquery/src/exports/amd.js +0 -24
- data/tests/components/jquery/src/exports/global.js +0 -32
- data/tests/components/jquery/src/intro.js +0 -44
- data/tests/components/jquery/src/jquery.js +0 -37
- data/tests/components/jquery/src/manipulation.js +0 -580
- data/tests/components/jquery/src/manipulation/_evalUrl.js +0 -18
- data/tests/components/jquery/src/manipulation/support.js +0 -32
- data/tests/components/jquery/src/manipulation/var/rcheckableType.js +0 -3
- data/tests/components/jquery/src/offset.js +0 -207
- data/tests/components/jquery/src/outro.js +0 -1
- data/tests/components/jquery/src/queue.js +0 -142
- data/tests/components/jquery/src/queue/delay.js +0 -22
- data/tests/components/jquery/src/selector-native.js +0 -172
- data/tests/components/jquery/src/selector-sizzle.js +0 -14
- data/tests/components/jquery/src/selector.js +0 -1
- data/tests/components/jquery/src/serialize.js +0 -111
- data/tests/components/jquery/src/sizzle/dist/sizzle.js +0 -2067
- data/tests/components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/tests/components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/tests/components/jquery/src/traversing.js +0 -199
- data/tests/components/jquery/src/traversing/findFilter.js +0 -100
- data/tests/components/jquery/src/traversing/var/rneedsContext.js +0 -6
- data/tests/components/jquery/src/var/arr.js +0 -3
- data/tests/components/jquery/src/var/class2type.js +0 -4
- data/tests/components/jquery/src/var/concat.js +0 -5
- data/tests/components/jquery/src/var/hasOwn.js +0 -5
- data/tests/components/jquery/src/var/indexOf.js +0 -5
- data/tests/components/jquery/src/var/pnum.js +0 -3
- data/tests/components/jquery/src/var/push.js +0 -5
- data/tests/components/jquery/src/var/rnotwhite.js +0 -3
- data/tests/components/jquery/src/var/slice.js +0 -5
- data/tests/components/jquery/src/var/strundefined.js +0 -3
- data/tests/components/jquery/src/var/support.js +0 -4
- data/tests/components/jquery/src/var/toString.js +0 -5
- data/tests/components/jquery/src/wrap.js +0 -79
@@ -1,143 +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
|
-
<meta http-equiv="content-type" value="text/html; charset=UTF-8" />
|
7
|
-
<title>Javascript code prettifier</title>
|
8
|
-
|
9
|
-
<link href="src/prettify.css" type="text/css" rel="stylesheet" />
|
10
|
-
|
11
|
-
<script src="src/prettify.js" type="text/javascript"></script>
|
12
|
-
|
13
|
-
<style type="text/css">
|
14
|
-
body { margin-left: .5in }
|
15
|
-
h1, h2, h3, h4, .footer { margin-left: -.4in; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body onload="prettyPrint()" bgcolor="white">
|
20
|
-
<h1>Javascript code prettifier</h1>
|
21
|
-
<h1>Javascript 代码美容师</h1>
|
22
|
-
<h2>安装使用</h2>
|
23
|
-
<ol>
|
24
|
-
<li><a href="http://google-code-prettify.googlecode.com/files/prettify-small-5-Jul-2008.zip">下载</a> 文件
|
25
|
-
<li>在你的文件中包含这儿的脚本和样式表(你要保证这儿的 css 和 js 文件按在你的服务器上, 并且调整在 <tt>script</tt> 和 <tt>link</tt>标签中的路径)
|
26
|
-
<pre class="prettyprint">
|
27
|
-
<link href="prettify.css" type="text/css" rel="stylesheet" />
|
28
|
-
<script type="text/javascript" src="prettify.js"></script></pre>
|
29
|
-
<li>添加<code class="prettyprint">onload="prettyPrint()"</code> 到你的文件的 body 标签中.
|
30
|
-
<li>修改样式表,使用你自己喜欢的颜色.</li>
|
31
|
-
</ol>
|
32
|
-
|
33
|
-
<h2>使用方法<br></h2>
|
34
|
-
<p>在
|
35
|
-
<tt><pre class="prettyprint">...</pre></tt> 或 <tt><code class="prettyprint">...</code></tt>
|
36
|
-
中间放上代码片段,它就会自动被美化了.
|
37
|
-
|
38
|
-
<table summary="code examples">
|
39
|
-
<tr>
|
40
|
-
<th>The original
|
41
|
-
<th>Prettier
|
42
|
-
<tr>
|
43
|
-
<td><pre style="border: 1px solid #888;padding: 2px"
|
44
|
-
><a name="voila1"></a>class Voila {
|
45
|
-
public:
|
46
|
-
// Voila
|
47
|
-
static const string VOILA = "Voila";
|
48
|
-
|
49
|
-
// will not interfere with embedded <a href="#voila1">tags</a>.
|
50
|
-
}</pre>
|
51
|
-
|
52
|
-
<td><pre class="prettyprint"><a name="voila2"></a>class Voila {
|
53
|
-
public:
|
54
|
-
// Voila
|
55
|
-
static const string VOILA = "Voila";
|
56
|
-
|
57
|
-
// will not interfere with embedded <a href="#voila2">tags</a>.
|
58
|
-
}</pre>
|
59
|
-
</table>
|
60
|
-
|
61
|
-
|
62
|
-
<h2>常见问题</h2>
|
63
|
-
<h3 id="langs">它是为什么语言工作的?</h3>
|
64
|
-
<p><tt>prettify.js中的注释是权威的,但是它的语法分析程序可以在很多语言中使用</tt>,包括 C ,
|
65
|
-
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, 和 Makefiles.
|
66
|
-
它在 Ruby, PHP, VB, 和 Awk 中还算可以,而且也可以在 Perl 和 Ruby的合适子集中起作用,但是, 因为注释的约定,它对
|
67
|
-
Smalltalk, 或 CAML类似的语言起作用.<br></p>
|
68
|
-
|
69
|
-
|
70
|
-
<p>LISP系列的语言可以使用一个拓展<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"><code>lang-lisp.js</code></a>.</p><p>对于 <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css"><code>CSS</code></a>,
|
71
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs"><code>Haskell</code></a>,
|
72
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"><code>Lua</code></a>,
|
73
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"><code>OCAML, SML, F#</code></a>,
|
74
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"><code>Visual Basic</code></a>,
|
75
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"><code>SQL</code></a>,
|
76
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"><code>Protocol Buffers</code></a>, 和
|
77
|
-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"><code>WikiText</code></a>..也是类似的</p><p>如果你想给你喜欢的语言写个拓展版本, 请参阅<tt>src/lang-lisp.js</tt> ,并写一个包括你的语言的拓展的 <a href="http://code.google.com/p/google-code-prettify/issues/list"
|
78
|
-
>发布</a> 和一个测试用例.</p>
|
79
|
-
|
80
|
-
<h3>如何指定我的代码在哪种语言里?</h3>
|
81
|
-
<p>你不需要指定语言环境,因为 <code>prettyprint()</code>
|
82
|
-
会对此进行猜测. 你可以使用<code> prettyprint </code>这个类通过指定语言的拓展名来指定语言,就像这样:</p>
|
83
|
-
<pre class="prettyprint lang-html"
|
84
|
-
><pre class="prettyprint <b>lang-html</b>">
|
85
|
-
The lang-* class specifies the language file extensions.
|
86
|
-
File extensions supported by default include
|
87
|
-
"bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
|
88
|
-
"java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
|
89
|
-
"xhtml", "xml", "xsl".
|
90
|
-
</pre></pre>
|
91
|
-
|
92
|
-
<h3>它在混淆代码例子上不起作用吗?</h3>
|
93
|
-
<p>是的. 美化混淆代码就像给小猪涂口红,也就是不在这个工具的范围内. <br></p>
|
94
|
-
|
95
|
-
<h3>它可以在那些浏览器上工作?</h3>
|
96
|
-
<p>这个工具已经在 IE 6, Firefox 1.5 & 2, 和 Safari 2.0.4 上测试通过. 打开 <a href="tests/prettify_test.html">测试页面</a> ,看看它能不能在你的浏览器上起作用.</p>
|
97
|
-
|
98
|
-
<h3>有什么改变?</h3>
|
99
|
-
<p>查看 <a href="CHANGES.html">变化日志</a></p>
|
100
|
-
|
101
|
-
<h3> 为什么Prettyprinting 对WordPress中的字符串没用?</h3>
|
102
|
-
<p>很显然,wordpress 在 "smart quoting" 时会改变关闭符号.
|
103
|
-
这使得关闭符号跟开始符号不配套.
|
104
|
-
<p>这和复制粘贴代码一样,破坏了美化作用. 去
|
105
|
-
<a href="http://wordpress.org/support/topic/125038"
|
106
|
-
>WordPress's help center</a> 查看更多关于如何关闭插入代码段时的"smart quoting"的信息.</p>
|
107
|
-
|
108
|
-
<h3>如何在我的代码中加入行号? (Out of date -- see <a href="README.html">English version</a>)</h3>
|
109
|
-
<p>你可以使用 <code>nocode</code> 类来标记 span 标记不是代码.
|
110
|
-
<pre><pre class=prettyprint>
|
111
|
-
<span class="<b>nocode</b>">1:</span> /* This is line 1 of my code
|
112
|
-
<span class="<b>nocode</b>">2:</span> * and here's line 2 */
|
113
|
-
<span class="<b>nocode</b>">3:</span> print("I'm line number 3");
|
114
|
-
</pre></pre>得到
|
115
|
-
<pre class=prettyprint>
|
116
|
-
<span class="nocode">1:</span> /* This is line 1 of my code
|
117
|
-
<span class="nocode">2:</span> * and here's line 2 */
|
118
|
-
<span class="nocode">3:</span> print("I'm line number 3");
|
119
|
-
</pre>
|
120
|
-
|
121
|
-
<p>查看一个更完整的例子: issue22
|
122
|
-
<a href="tests/prettify_test.html#issue22">testcase</a>.</p>
|
123
|
-
|
124
|
-
<h3>我得到了这样一条错误信息 "a is not a function" 或 "opt_whenDone is not a function"</h3>
|
125
|
-
<p>如果你通过事件句柄条用 <code>prettyPrint</code> , 把它隐藏到一个函数中. <br></p><p>不要这么写
|
126
|
-
</p><blockquote>
|
127
|
-
<code class="prettyprint lang-js"
|
128
|
-
>addEventListener('load', prettyPrint, false);</code>
|
129
|
-
</blockquote>而要这么写
|
130
|
-
<blockquote>
|
131
|
-
<code class="prettyprint lang-js"
|
132
|
-
>addEventListener('load', function (event) { prettyPrint() }, false);</code>
|
133
|
-
</blockquote>这样的话,浏览器就不会把时间对象传递给 <code>prettyPrint</code> ,事件对象会让它困惑的.
|
134
|
-
|
135
|
-
<br><br><br>
|
136
|
-
|
137
|
-
<div class="footer">
|
138
|
-
<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
|
139
|
-
<!-- hhmts start -->
|
140
|
-
Last modified: Wed Jan 7 13:25:42 PST 2009<br><!-- hhmts end -->
|
141
|
-
</div>
|
142
|
-
</body>
|
143
|
-
</html>
|
@@ -1,233 +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
|
-
a.Extension { display: inline-block; width: 5em; height:2.5em; border: 1px solid black; vertical-align: top; text-align: center }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body onload="prettyPrint()" bgcolor="white">
|
20
|
-
<small style="float: right">Languages : <a href="README-zh-Hans.html">CH</a></small>
|
21
|
-
<h1>Javascript code prettifier</h1>
|
22
|
-
|
23
|
-
<h2>Setup</h2>
|
24
|
-
<ol>
|
25
|
-
<li><a href="http://code.google.com/p/google-code-prettify/downloads/list">Download</a> a distribution
|
26
|
-
<li>Include the script tag below in your document
|
27
|
-
<pre class="prettyprint">
|
28
|
-
>script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js></script></pre>
|
29
|
-
<li>See <a href="http://code.google.com/p/google-code-prettify/wiki/GettingStarted">Getting Started</a> to configure that URL with options you need.</a>
|
30
|
-
<li>Look at the <a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">skin gallery</a> and pick styles that suit you.</li>
|
31
|
-
</ol>
|
32
|
-
|
33
|
-
<h2>Usage</h2>
|
34
|
-
<p>Put code snippets in
|
35
|
-
<tt><pre class="prettyprint">...</pre></tt>
|
36
|
-
or <tt><code class="prettyprint">...</code></tt>
|
37
|
-
and it will automatically be pretty printed.
|
38
|
-
|
39
|
-
<table summary="code examples">
|
40
|
-
<tr>
|
41
|
-
<th>The original
|
42
|
-
<th>Prettier
|
43
|
-
<tr>
|
44
|
-
<td><pre style="border: 1px solid #888;padding: 2px"
|
45
|
-
><a name="voila1"></a>class Voila {
|
46
|
-
public:
|
47
|
-
// Voila
|
48
|
-
static const string VOILA = "Voila";
|
49
|
-
|
50
|
-
// will not interfere with embedded <a href="#voila1">tags</a>.
|
51
|
-
}</pre>
|
52
|
-
|
53
|
-
<td><pre class="prettyprint"><a name="voila2"></a>class Voila {
|
54
|
-
public:
|
55
|
-
// Voila
|
56
|
-
static const string VOILA = "Voila";
|
57
|
-
|
58
|
-
// will not interfere with embedded <a href="#voila2">tags</a>.
|
59
|
-
}</pre>
|
60
|
-
</table>
|
61
|
-
|
62
|
-
<h2>FAQ</h2>
|
63
|
-
<h3 id="langs">For which languages does it work?</h3>
|
64
|
-
<p>The comments in <tt>prettify.js</tt> are authoritative but the lexer
|
65
|
-
should work on a number of languages including C and friends,
|
66
|
-
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles,
|
67
|
-
and Rust.
|
68
|
-
It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl
|
69
|
-
and Ruby, but, because of commenting conventions, but doesn't work on
|
70
|
-
Smalltalk.</p>
|
71
|
-
|
72
|
-
<p>Other languages are supported via extensions:
|
73
|
-
<div>
|
74
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-apollo.js">Apollo</a>
|
75
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-basic.js">Basic</a>
|
76
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-clj.js">Clojure</a>
|
77
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js">CSS</a>
|
78
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-dart.js">Dart</a>
|
79
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-erlang.js">Erlang</a>
|
80
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-go.js">Go</a>
|
81
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js">Haskell</a>
|
82
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js">Lisp, Scheme</a>
|
83
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-llvm.js">Llvm</a>
|
84
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js">Lua</a>
|
85
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-matlab.js">Matlab</a>
|
86
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js">MLs:F#, Ocaml,SML</a>
|
87
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-mumps.js">Mumps</a>
|
88
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-n.js">Nemerle</a>
|
89
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-pascal.js">Pascal</a>
|
90
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js">Protocol buffers</a>
|
91
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-r.js">R, S</a>
|
92
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-rd.js">RD</a>
|
93
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-scala.js">Scala</a>
|
94
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js">SQL</a>
|
95
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tcl.js">TCL</a>
|
96
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.js">Latek</a>
|
97
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js">Visual Basic</a>
|
98
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vhdl.js">CHDL</a>
|
99
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js">Wiki</a>
|
100
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-xq.js">XQ</a>
|
101
|
-
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-yaml.js">YAML</a>
|
102
|
-
</div>
|
103
|
-
|
104
|
-
<p>If you'd like to add an extension for your favorite language, please
|
105
|
-
look at <tt>src/lang-lisp.js</tt> and file an
|
106
|
-
<a href="http://code.google.com/p/google-code-prettify/issues/list"
|
107
|
-
>issue</a> including your language extension, and a testcase.</p>
|
108
|
-
|
109
|
-
<h3>How do I specify the language of my code?</h3>
|
110
|
-
<p>You don't need to specify the language since <code>prettyprint()</code>
|
111
|
-
will guess. You can specify a language by specifying the language extension
|
112
|
-
along with the <code>prettyprint</code> class like so:</p>
|
113
|
-
<pre class="prettyprint lang-html"
|
114
|
-
><pre class="prettyprint <b>lang-html</b>">
|
115
|
-
The lang-* class specifies the language file extensions.
|
116
|
-
File extensions supported by default include
|
117
|
-
"bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
|
118
|
-
"java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
|
119
|
-
"xhtml", "xml", "xsl".
|
120
|
-
</pre></pre>
|
121
|
-
|
122
|
-
<p>You may also use the
|
123
|
-
<a href="http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element"
|
124
|
-
>HTML 5</a> convention of embedding a <tt>code</tt> element inside the
|
125
|
-
<code>PRE</code> and using <code>language-java</code> style classes.
|
126
|
-
E.g. <xmp class="prettyprint"><pre class="prettyprint"><code class="language-java">...</code></pre></xmp>
|
127
|
-
|
128
|
-
<h3>It doesn't work on <tt><obfuscated code sample></tt>?</h3>
|
129
|
-
<p>Yes. Prettifying obfuscated code is like putting lipstick on a pig
|
130
|
-
— i.e. outside the scope of this tool.</p>
|
131
|
-
|
132
|
-
<h3>Which browsers does it work with?</h3>
|
133
|
-
<p>It's been tested with IE 6, Firefox 1.5 & 2, and Safari 2.0.4.
|
134
|
-
Look at <a href="tests/prettify_test.html">the test page</a> to see if it
|
135
|
-
works in your browser.</p>
|
136
|
-
|
137
|
-
<h3>What's changed?</h3>
|
138
|
-
<p>See the <a href="CHANGES.html">change log</a></p>
|
139
|
-
|
140
|
-
<h3>Why doesn't Prettyprinting of strings work on WordPress?</h3>
|
141
|
-
<p>Apparently wordpress does "smart quoting" which changes close quotes.
|
142
|
-
This causes end quotes to not match up with open quotes.
|
143
|
-
<p>This breaks prettifying as well as copying and pasting of code samples.
|
144
|
-
See
|
145
|
-
<a href="http://wordpress.org/support/topic/125038"
|
146
|
-
>WordPress's help center</a> for info on how to stop smart quoting of code
|
147
|
-
snippets.</p>
|
148
|
-
|
149
|
-
<h3 id="linenums">How do I put line numbers in my code?</h3>
|
150
|
-
<p>You can use the <code>linenums</code> class to turn on line
|
151
|
-
numbering. If your code doesn't start at line number 1, you can
|
152
|
-
add a colon and a line number to the end of that class as in
|
153
|
-
<code>linenums:52</code>.
|
154
|
-
|
155
|
-
<p>For example
|
156
|
-
<pre class="prettyprint"><pre class="prettyprint linenums:<b>4</b>"
|
157
|
-
>// This is line 4.
|
158
|
-
foo();
|
159
|
-
bar();
|
160
|
-
baz();
|
161
|
-
boo();
|
162
|
-
far();
|
163
|
-
faz();
|
164
|
-
<pre></pre>
|
165
|
-
produces
|
166
|
-
<pre class="prettyprint linenums:4"
|
167
|
-
>// This is line 4.
|
168
|
-
foo();
|
169
|
-
bar();
|
170
|
-
baz();
|
171
|
-
boo();
|
172
|
-
far();
|
173
|
-
faz();
|
174
|
-
</pre>
|
175
|
-
|
176
|
-
<h3>How do I prevent a portion of markup from being marked as code?</h3>
|
177
|
-
<p>You can use the <code>nocode</code> class to identify a span of markup
|
178
|
-
that is not code.
|
179
|
-
<pre class="prettyprint"><pre class=prettyprint>
|
180
|
-
int x = foo(); /* This is a comment <span class="nocode">This is not code</span>
|
181
|
-
Continuation of comment */
|
182
|
-
int y = bar();
|
183
|
-
</pre></pre>
|
184
|
-
produces
|
185
|
-
<pre class="prettyprint">
|
186
|
-
int x = foo(); /* This is a comment <span class="nocode">This is not code</span>
|
187
|
-
Continuation of comment */
|
188
|
-
int y = bar();
|
189
|
-
</pre>
|
190
|
-
|
191
|
-
<p>For a more complete example see the issue22
|
192
|
-
<a href="tests/prettify_test.html#issue22">testcase</a>.</p>
|
193
|
-
|
194
|
-
<h3>I get an error message "a is not a function" or "opt_whenDone is not a function"</h3>
|
195
|
-
<p>If you are calling <code>prettyPrint</code> via an event handler, wrap it in a function.
|
196
|
-
Instead of doing
|
197
|
-
<blockquote>
|
198
|
-
<code class="prettyprint lang-js"
|
199
|
-
>addEventListener('load', prettyPrint, false);</code>
|
200
|
-
</blockquote>
|
201
|
-
wrap it in a closure like
|
202
|
-
<blockquote>
|
203
|
-
<code class="prettyprint lang-js"
|
204
|
-
>addEventListener('load', function (event) { prettyPrint() }, false);</code>
|
205
|
-
</blockquote>
|
206
|
-
so that the browser does not pass an event object to <code>prettyPrint</code> which
|
207
|
-
will confuse it.
|
208
|
-
|
209
|
-
<h3>How can I customize the colors and styles of my code?</h3>
|
210
|
-
<p>
|
211
|
-
Prettify adds <code><span></code> with <code>class</code>es describing
|
212
|
-
the kind of code. You can create CSS styles to matches these
|
213
|
-
classes.
|
214
|
-
See the
|
215
|
-
<a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">
|
216
|
-
theme gallery</a> for examples.
|
217
|
-
</p>
|
218
|
-
|
219
|
-
<h3>I can't add classes to my code (because it comes from Markdown, etc.)</h3>
|
220
|
-
<p>
|
221
|
-
Instead of <code class="prettyprint"><pre class="prettyprint ..."></code> you can use a
|
222
|
-
comment or processing instructions that survives processing instructions :
|
223
|
-
<code><?prettify ...?></code> works as explained in
|
224
|
-
<a href="http://code.google.com/p/google-code-prettify/wiki/GettingStarted">Getting Started</a></p>
|
225
|
-
|
226
|
-
<br><br><br>
|
227
|
-
|
228
|
-
<div class="footer">
|
229
|
-
<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
|
230
|
-
<!-- hhmts start -->Last modified: Mon Mar 4 14:16:04 EST 2013 <!-- hhmts end -->
|
231
|
-
</div>
|
232
|
-
</body>
|
233
|
-
</html>
|
@@ -1,54 +0,0 @@
|
|
1
|
-
# Google Code Prettify
|
2
|
-
|
3
|
-
Direct port of svn into git from http://google-code-prettify.googlecode.com/svn/trunk/
|
4
|
-
|
5
|
-
## Install
|
6
|
-
|
7
|
-
via [Bower](http://twitter.github.com/bower/)
|
8
|
-
|
9
|
-
bower install google-code-prettify
|
10
|
-
|
11
|
-
or [Yeoman](http://yeoman.io/)
|
12
|
-
|
13
|
-
yeoman install google-code-prettify
|
14
|
-
|
15
|
-
|
16
|
-
## Usage
|
17
|
-
|
18
|
-
The prettify script is AMD compatible and can be used modularly. Here is an example of it in an AMD module:
|
19
|
-
|
20
|
-
```javascript
|
21
|
-
define(['jquery', 'prettify'], function($, prettify){
|
22
|
-
var code = null;
|
23
|
-
$('pre').addClass('prettyprint').each(function(idx, el){
|
24
|
-
code = el.firstChild;
|
25
|
-
code.innerHTML = prettify.prettyPrintOne(code.innerHTML);
|
26
|
-
})
|
27
|
-
);
|
28
|
-
});
|
29
|
-
```
|
30
|
-
|
31
|
-
This version of google-code-prettify defines an anonymous module, which is more flexible. To allow your AMD loader to find google-code-prettify with a more convenient name, map a path to it as follows:
|
32
|
-
|
33
|
-
```js
|
34
|
-
// using RequireJS
|
35
|
-
require.config({
|
36
|
-
prettify: 'bower_components/google-code-prettify/prettify'
|
37
|
-
});
|
38
|
-
|
39
|
-
// using curl.js
|
40
|
-
curl.config({
|
41
|
-
prettify: 'bower_components/google-code-prettify/prettify'
|
42
|
-
});
|
43
|
-
```
|
44
|
-
|
45
|
-
Or it may just be used in a global context like the following:
|
46
|
-
|
47
|
-
```javascript
|
48
|
-
(function(){
|
49
|
-
$('pre').addClass('prettyprint');
|
50
|
-
prettyPrint();
|
51
|
-
})();
|
52
|
-
```
|
53
|
-
|
54
|
-
More information can be found in the original [README.html](http://google-code-prettify.googlecode.com/svn/trunk/README.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,30 +0,0 @@
|
|
1
|
-
!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
|
2
|
-
(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
|
3
|
-
b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
|
4
|
-
h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
|
5
|
-
(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
|
6
|
-
f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
|
7
|
-
a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
|
8
|
-
if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
|
9
|
-
g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
|
10
|
-
q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
|
11
|
-
/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
|
12
|
-
s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
|
13
|
-
q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
|
14
|
-
c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
|
15
|
-
r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
|
16
|
-
a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
|
17
|
-
t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
|
18
|
-
"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
|
19
|
-
O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,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"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"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"],
|
20
|
-
Q=[y,"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"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
|
21
|
-
V=/\S/,X=v({keywords:[M,O,E,"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",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
|
22
|
-
/^<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"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
|
23
|
-
["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"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
|
24
|
-
["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"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",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
|
25
|
-
hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"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",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
|
26
|
-
p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
|
27
|
-
return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
|
28
|
-
o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
|
29
|
-
{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
|
30
|
-
h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
|