utopia-wiki 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/development.yml +62 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.yarnrc +1 -0
- data/Gemfile +4 -0
- data/README.md +46 -0
- data/bake/utopia/wiki.rb +13 -0
- data/lib/components/.yarn-integrity +19 -0
- data/lib/components/jquery-litebox/README.md +66 -0
- data/lib/components/jquery-litebox/bower.json +27 -0
- data/lib/components/jquery-litebox/dist/jquery.litebox.css +23 -0
- data/lib/components/jquery-litebox/dist/jquery.litebox.gallery.css +48 -0
- data/lib/components/jquery-litebox/dist/jquery.litebox.js +30 -0
- data/lib/components/jquery-litebox/example/index.html +69 -0
- data/lib/components/jquery-litebox/example/jquery.min.js +4 -0
- data/lib/components/jquery-litebox/example/sample_images/large/IMG_3340.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/large/IMG_3341.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/large/IMG_3344.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/large/IMG_3351.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/medium/IMG_3340.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/medium/IMG_3341.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/medium/IMG_3344.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/medium/IMG_3351.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/small/IMG_3340.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/small/IMG_3341.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/small/IMG_3344.jpg +0 -0
- data/lib/components/jquery-litebox/example/sample_images/small/IMG_3351.jpg +0 -0
- data/lib/components/jquery-litebox/package.json +29 -0
- data/lib/components/jquery-syntax/Gemfile +5 -0
- data/lib/components/jquery-syntax/LICENSE.txt +19 -0
- data/lib/components/jquery-syntax/NOTES.txt +20 -0
- data/lib/components/jquery-syntax/README.md +95 -0
- data/lib/components/jquery-syntax/Rakefile +211 -0
- data/lib/components/jquery-syntax/bower.json +25 -0
- data/lib/components/jquery-syntax/config.ru +4 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.apache.css +12 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.applescript.css +5 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.assembly.css +8 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.bash-script.css +6 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.bash.css +4 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.clang.css +6 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.css.css +14 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.diff.css +16 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.html.css +5 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.ocaml.css +3 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.protobuf.css +2 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.python.css +6 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.ruby.css +2 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.brush.xml.css +18 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.core.css +58 -0
- data/lib/components/jquery-syntax/dist/base/jquery.syntax.editor.css +6 -0
- data/lib/components/jquery-syntax/dist/base/theme.js +1 -0
- data/lib/components/jquery-syntax/dist/bright/jquery.syntax.core.css +27 -0
- data/lib/components/jquery-syntax/dist/bright/theme.js +1 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.apache.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.applescript.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.assembly.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.bash-script.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.bash.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.basic.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.clang.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.csharp.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.css.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.diff.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.go.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.haskell.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.html.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.io.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.java.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.javascript.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.kai.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.lisp.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.lua.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.nginx.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.ocaml.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.ooc.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.pascal.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.perl5.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.php-script.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.php.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.plain.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.protobuf.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.python.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.ruby.js +5 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.scala.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.smalltalk.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.sql.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.super-collider.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.swift.js +3 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.trenni.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.xml.js +4 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.brush.yaml.js +2 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.cache.js +7 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.core.js +34 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.editor.js +11 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.js +8 -0
- data/lib/components/jquery-syntax/dist/jquery.syntax.min.js +13 -0
- data/lib/components/jquery-syntax/dist/paper/jquery.syntax.core.css +31 -0
- data/lib/components/jquery-syntax/dist/paper/theme.js +1 -0
- data/lib/components/jquery-syntax/examples/ex.applescript.html +120 -0
- data/lib/components/jquery-syntax/examples/ex.asm.html +43 -0
- data/lib/components/jquery-syntax/examples/ex.bash.html +139 -0
- data/lib/components/jquery-syntax/examples/ex.clang.html +337 -0
- data/lib/components/jquery-syntax/examples/ex.css.html +48 -0
- data/lib/components/jquery-syntax/examples/ex.diff.html +1226 -0
- data/lib/components/jquery-syntax/examples/ex.editor.html +28 -0
- data/lib/components/jquery-syntax/examples/ex.html.html +134 -0
- data/lib/components/jquery-syntax/examples/ex.javascript.html +330 -0
- data/lib/components/jquery-syntax/examples/ex.ooc.html +119 -0
- data/lib/components/jquery-syntax/examples/ex.php.html +54 -0
- data/lib/components/jquery-syntax/examples/ex.python.html +1510 -0
- data/lib/components/jquery-syntax/examples/ex.ruby.html +358 -0
- data/lib/components/jquery-syntax/examples/ex.swift.html +90 -0
- data/lib/components/jquery-syntax/examples/index.css +18 -0
- data/lib/components/jquery-syntax/examples/jquery-1.6.min.js +16 -0
- data/lib/components/jquery-syntax/examples/tests.html +71 -0
- data/lib/components/jquery-syntax/examples/wrapping-flex.html +71 -0
- data/lib/components/jquery-syntax/examples/wrapping.html +181 -0
- data/lib/components/jquery-syntax/ext/closure/COPYING +202 -0
- data/lib/components/jquery-syntax/ext/closure/README +292 -0
- data/lib/components/jquery-syntax/ext/closure/compiler.jar +0 -0
- data/lib/components/jquery-syntax/ext/theme.rb +85 -0
- data/lib/components/jquery-syntax/install.yaml +9 -0
- data/lib/components/jquery-syntax/jQuery.Syntax.artx/Preview/preview.png +0 -0
- data/lib/components/jquery-syntax/jQuery.Syntax.artx/doc.thread +0 -0
- data/lib/components/jquery-syntax/package.json +31 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.apache.js +41 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.applescript.js +57 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.assembly.js +37 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.bash-script.js +67 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.bash.js +33 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.basic.js +51 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.clang.js +89 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.csharp.js +47 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.css.js +80 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.diff.js +24 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.go.js +47 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.haskell.js +45 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.html.js +66 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.io.js +45 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.java.js +45 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.javascript.js +42 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.kai.js +29 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.lisp.js +34 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.lua.js +44 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.nginx.js +30 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.ocaml.js +73 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.ooc.js +46 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.pascal.js +51 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.perl5.js +52 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.php-script.js +48 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.php.js +15 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.plain.js +10 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.protobuf.js +43 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.python.js +44 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.ruby.js +77 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.scala.js +44 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.smalltalk.js +29 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.sql.js +31 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.super-collider.js +57 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.swift.js +55 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.trenni.js +35 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.xml.js +50 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.brush.yaml.js +29 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.core.js +1114 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.editor.js +291 -0
- data/lib/components/jquery-syntax/source/jquery.syntax.js +258 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.apache.sass +23 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.applescript.sass +11 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.assembly.sass +16 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.bash-script.sass +14 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.bash.sass +11 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.clang.sass +12 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.css.sass +25 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.diff.sass +25 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.html.sass +12 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.ocaml.sass +8 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.protobuf.sass +7 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.python.sass +12 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.ruby.sass +9 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.brush.xml.sass +30 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.core.sass +86 -0
- data/lib/components/jquery-syntax/themes/base/jquery.syntax.editor.sass +12 -0
- data/lib/components/jquery-syntax/themes/bright/_config.yaml +2 -0
- data/lib/components/jquery-syntax/themes/bright/jquery.syntax.core.sass +42 -0
- data/lib/components/jquery-syntax/themes/paper/_config.yaml +2 -0
- data/lib/components/jquery-syntax/themes/paper/jquery.syntax.core.sass +47 -0
- data/lib/components/jquery/AUTHORS.txt +327 -0
- data/lib/components/jquery/LICENSE.txt +20 -0
- data/lib/components/jquery/README.md +62 -0
- data/lib/components/jquery/bower.json +14 -0
- data/lib/components/jquery/dist/jquery.js +10872 -0
- data/lib/components/jquery/dist/jquery.min.js +2 -0
- data/lib/components/jquery/dist/jquery.min.map +1 -0
- data/lib/components/jquery/dist/jquery.slim.js +8777 -0
- data/lib/components/jquery/dist/jquery.slim.min.js +2 -0
- data/lib/components/jquery/dist/jquery.slim.min.map +1 -0
- data/lib/components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/lib/components/jquery/external/sizzle/dist/sizzle.js +2478 -0
- data/lib/components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/lib/components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/lib/components/jquery/package.json +117 -0
- data/lib/components/jquery/src/ajax.js +873 -0
- data/lib/components/jquery/src/ajax/jsonp.js +103 -0
- data/lib/components/jquery/src/ajax/load.js +77 -0
- data/lib/components/jquery/src/ajax/script.js +74 -0
- data/lib/components/jquery/src/ajax/var/location.js +5 -0
- data/lib/components/jquery/src/ajax/var/nonce.js +5 -0
- data/lib/components/jquery/src/ajax/var/rquery.js +5 -0
- data/lib/components/jquery/src/ajax/xhr.js +170 -0
- data/lib/components/jquery/src/attributes.js +13 -0
- data/lib/components/jquery/src/attributes/attr.js +141 -0
- data/lib/components/jquery/src/attributes/classes.js +186 -0
- data/lib/components/jquery/src/attributes/prop.js +143 -0
- data/lib/components/jquery/src/attributes/support.js +33 -0
- data/lib/components/jquery/src/attributes/val.js +191 -0
- data/lib/components/jquery/src/callbacks.js +236 -0
- data/lib/components/jquery/src/core.js +400 -0
- data/lib/components/jquery/src/core/DOMEval.js +43 -0
- data/lib/components/jquery/src/core/access.js +72 -0
- data/lib/components/jquery/src/core/camelCase.js +23 -0
- data/lib/components/jquery/src/core/init.js +129 -0
- data/lib/components/jquery/src/core/isAttached.js +26 -0
- data/lib/components/jquery/src/core/nodeName.js +13 -0
- data/lib/components/jquery/src/core/parseHTML.js +65 -0
- data/lib/components/jquery/src/core/parseXML.js +30 -0
- data/lib/components/jquery/src/core/ready-no-deferred.js +97 -0
- data/lib/components/jquery/src/core/ready.js +86 -0
- data/lib/components/jquery/src/core/readyException.js +13 -0
- data/lib/components/jquery/src/core/stripAndCollapse.js +14 -0
- data/lib/components/jquery/src/core/support.js +20 -0
- data/lib/components/jquery/src/core/toType.js +20 -0
- data/lib/components/jquery/src/core/var/rsingleTag.js +7 -0
- data/lib/components/jquery/src/css.js +494 -0
- data/lib/components/jquery/src/css/addGetHookIf.js +26 -0
- data/lib/components/jquery/src/css/adjustCSS.js +74 -0
- data/lib/components/jquery/src/css/curCSS.js +65 -0
- data/lib/components/jquery/src/css/finalPropName.js +42 -0
- data/lib/components/jquery/src/css/hiddenVisibleSelectors.js +15 -0
- data/lib/components/jquery/src/css/showHide.js +105 -0
- data/lib/components/jquery/src/css/support.js +133 -0
- data/lib/components/jquery/src/css/var/cssExpand.js +5 -0
- data/lib/components/jquery/src/css/var/getStyles.js +17 -0
- data/lib/components/jquery/src/css/var/isHiddenWithinTree.js +34 -0
- data/lib/components/jquery/src/css/var/rboxStyle.js +7 -0
- data/lib/components/jquery/src/css/var/rnumnonpx.js +7 -0
- data/lib/components/jquery/src/css/var/swap.js +26 -0
- data/lib/components/jquery/src/data.js +180 -0
- data/lib/components/jquery/src/data/Data.js +162 -0
- data/lib/components/jquery/src/data/var/acceptData.js +19 -0
- data/lib/components/jquery/src/data/var/dataPriv.js +7 -0
- data/lib/components/jquery/src/data/var/dataUser.js +7 -0
- data/lib/components/jquery/src/deferred.js +399 -0
- data/lib/components/jquery/src/deferred/exceptionHook.js +21 -0
- data/lib/components/jquery/src/deprecated.js +87 -0
- data/lib/components/jquery/src/deprecated/ajax-event-alias.js +22 -0
- data/lib/components/jquery/src/deprecated/event.js +48 -0
- data/lib/components/jquery/src/dimensions.js +57 -0
- data/lib/components/jquery/src/effects.js +701 -0
- data/lib/components/jquery/src/effects/Tween.js +125 -0
- data/lib/components/jquery/src/effects/animatedSelector.js +15 -0
- data/lib/components/jquery/src/event.js +892 -0
- data/lib/components/jquery/src/event/focusin.js +58 -0
- data/lib/components/jquery/src/event/support.js +11 -0
- data/lib/components/jquery/src/event/trigger.js +201 -0
- data/lib/components/jquery/src/exports/amd.js +26 -0
- data/lib/components/jquery/src/exports/global.js +34 -0
- data/lib/components/jquery/src/jquery.js +41 -0
- data/lib/components/jquery/src/manipulation.js +480 -0
- data/lib/components/jquery/src/manipulation/_evalUrl.js +32 -0
- data/lib/components/jquery/src/manipulation/buildFragment.js +106 -0
- data/lib/components/jquery/src/manipulation/getAll.js +32 -0
- data/lib/components/jquery/src/manipulation/setGlobalEval.js +22 -0
- data/lib/components/jquery/src/manipulation/support.js +41 -0
- data/lib/components/jquery/src/manipulation/var/rscriptType.js +5 -0
- data/lib/components/jquery/src/manipulation/var/rtagName.js +8 -0
- data/lib/components/jquery/src/manipulation/wrapMap.js +30 -0
- data/lib/components/jquery/src/offset.js +238 -0
- data/lib/components/jquery/src/queue.js +145 -0
- data/lib/components/jquery/src/queue/delay.js +24 -0
- data/lib/components/jquery/src/selector-native.js +241 -0
- data/lib/components/jquery/src/selector-sizzle.js +19 -0
- data/lib/components/jquery/src/selector.js +3 -0
- data/lib/components/jquery/src/serialize.js +136 -0
- data/lib/components/jquery/src/traversing.js +198 -0
- data/lib/components/jquery/src/traversing/findFilter.js +97 -0
- data/lib/components/jquery/src/traversing/var/dir.js +22 -0
- data/lib/components/jquery/src/traversing/var/rneedsContext.js +8 -0
- data/lib/components/jquery/src/traversing/var/siblings.js +17 -0
- data/lib/components/jquery/src/var/ObjectFunctionString.js +7 -0
- data/lib/components/jquery/src/var/arr.js +5 -0
- data/lib/components/jquery/src/var/class2type.js +6 -0
- data/lib/components/jquery/src/var/document.js +5 -0
- data/lib/components/jquery/src/var/documentElement.js +7 -0
- data/lib/components/jquery/src/var/flat.js +16 -0
- data/lib/components/jquery/src/var/fnToString.js +7 -0
- data/lib/components/jquery/src/var/getProto.js +5 -0
- data/lib/components/jquery/src/var/hasOwn.js +7 -0
- data/lib/components/jquery/src/var/indexOf.js +7 -0
- data/lib/components/jquery/src/var/isFunction.js +13 -0
- data/lib/components/jquery/src/var/isWindow.js +8 -0
- data/lib/components/jquery/src/var/pnum.js +5 -0
- data/lib/components/jquery/src/var/push.js +7 -0
- data/lib/components/jquery/src/var/rcheckableType.js +5 -0
- data/lib/components/jquery/src/var/rcssNum.js +9 -0
- data/lib/components/jquery/src/var/rnothtmlwhite.js +8 -0
- data/lib/components/jquery/src/var/slice.js +7 -0
- data/lib/components/jquery/src/var/support.js +6 -0
- data/lib/components/jquery/src/var/toString.js +7 -0
- data/lib/components/jquery/src/wrap.js +78 -0
- data/lib/utopia/wiki.rb +80 -0
- data/lib/utopia/wiki/version.rb +27 -0
- data/package.json +6 -0
- data/pages/_editor.xnode +21 -0
- data/pages/_heading.xnode +2 -0
- data/pages/_listing.xnode +23 -0
- data/pages/_navigation.xnode +33 -0
- data/pages/_page.xnode +32 -0
- data/pages/_thumbnail.xnode +8 -0
- data/pages/controller.rb +77 -0
- data/pages/create.xnode +15 -0
- data/pages/edit.xnode +10 -0
- data/pages/errors/exception.xnode +5 -0
- data/pages/errors/file-not-found.xnode +5 -0
- data/pages/links.yaml +2 -0
- data/pages/show.xnode +15 -0
- data/public/.nojekyll +0 -0
- data/public/_components/jquery-litebox/jquery.litebox.css +23 -0
- data/public/_components/jquery-litebox/jquery.litebox.gallery.css +48 -0
- data/public/_components/jquery-litebox/jquery.litebox.js +30 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +12 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +5 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +8 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +6 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +4 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +6 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.css.css +14 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +16 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.html.css +5 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +3 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +2 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.python.css +6 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +2 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +18 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.core.css +58 -0
- data/public/_components/jquery-syntax/base/jquery.syntax.editor.css +6 -0
- data/public/_components/jquery-syntax/base/theme.js +1 -0
- data/public/_components/jquery-syntax/bright/jquery.syntax.core.css +27 -0
- data/public/_components/jquery-syntax/bright/theme.js +1 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.apache.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.applescript.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.assembly.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.bash.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.basic.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.clang.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.csharp.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.css.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.diff.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.go.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.haskell.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.html.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.io.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.java.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.javascript.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.kai.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.lisp.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.lua.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.nginx.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.ooc.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.pascal.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.perl5.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.php-script.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.php.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.plain.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.python.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.ruby.js +5 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.scala.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.sql.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.swift.js +3 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.trenni.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.xml.js +4 -0
- data/public/_components/jquery-syntax/jquery.syntax.brush.yaml.js +2 -0
- data/public/_components/jquery-syntax/jquery.syntax.cache.js +7 -0
- data/public/_components/jquery-syntax/jquery.syntax.core.js +34 -0
- data/public/_components/jquery-syntax/jquery.syntax.editor.js +11 -0
- data/public/_components/jquery-syntax/jquery.syntax.js +8 -0
- data/public/_components/jquery-syntax/jquery.syntax.min.js +13 -0
- data/public/_components/jquery-syntax/paper/jquery.syntax.core.css +31 -0
- data/public/_components/jquery-syntax/paper/theme.js +1 -0
- data/public/_components/jquery/jquery.js +10872 -0
- data/public/_components/jquery/jquery.min.js +2 -0
- data/public/_components/jquery/jquery.min.map +1 -0
- data/public/_components/jquery/jquery.slim.js +8777 -0
- data/public/_components/jquery/jquery.slim.min.js +2 -0
- data/public/_components/jquery/jquery.slim.min.map +1 -0
- data/public/_static/icon.png +0 -0
- data/public/_static/site.css +191 -0
- data/utopia-wiki.gemspec +39 -0
- data/wiki/Gemfile +10 -0
- data/wiki/config.ru +7 -0
- data/wiki/pages/_logos/Async.png +0 -0
- data/wiki/pages/_logos/Falcon.png +0 -0
- data/wiki/pages/_logos/Utopia.png +0 -0
- data/wiki/pages/index.en.md +62 -0
- data/wiki/pages/index.md +57 -0
- data/wiki/pages/links.yaml +2 -0
- data/wiki/pages/usage/merging/index.md +3 -0
- data/yarn.lock +22 -0
- metadata +675 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<link rel="stylesheet" href="index.css" type="text/css" media="screen" />
|
5
|
+
|
6
|
+
<script src="jquery-1.6.min.js" type="text/javascript"></script>
|
7
|
+
<script src="../dist/jquery.syntax.js" type="text/javascript"></script>
|
8
|
+
<script src="../dist/jquery.syntax.cache.js" type="text/javascript"></script>
|
9
|
+
|
10
|
+
<script type="text/javascript">
|
11
|
+
$(function() {
|
12
|
+
jQuery.syntax({blockLayout: "editor", theme: "modern"});
|
13
|
+
});
|
14
|
+
</script>
|
15
|
+
|
16
|
+
</head>
|
17
|
+
<body>
|
18
|
+
<h1>Syntax Editor</h1>
|
19
|
+
|
20
|
+
<h2>Ruby Editor</h2>
|
21
|
+
|
22
|
+
<pre><code class="syntax clang">/* Foo Bar */
|
23
|
+
namespace x {
|
24
|
+
|
25
|
+
}
|
26
|
+
</pre>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,134 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<link rel="stylesheet" href="index.css" type="text/css" media="screen" />
|
5
|
+
|
6
|
+
<script src="jquery-1.6.min.js" type="text/javascript"></script>
|
7
|
+
|
8
|
+
<script src="../dist/jquery.syntax.js" type="text/javascript"></script>
|
9
|
+
<script src="../dist/jquery.syntax.cache.js" type="text/javascript"></script>
|
10
|
+
|
11
|
+
<script type="text/javascript" language="JavaScript">
|
12
|
+
//<!--
|
13
|
+
jQuery(function($) {
|
14
|
+
// This will display the current page's HTML, in the current page.
|
15
|
+
// Recursion will one day blow my mind beyond repair.
|
16
|
+
$('#self').text($('html').html());
|
17
|
+
|
18
|
+
$.syntax();
|
19
|
+
});
|
20
|
+
//-->
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<style type="text/css" media="screen">
|
24
|
+
/* Please note the CSS styled text - embedded in HTML */
|
25
|
+
.floyd {
|
26
|
+
is-any-one-out-there: "?";
|
27
|
+
padding: 10px;
|
28
|
+
}
|
29
|
+
</style>
|
30
|
+
|
31
|
+
</head>
|
32
|
+
<body>
|
33
|
+
<h1>Syntax: HTML / XML</h1>
|
34
|
+
|
35
|
+
<h2>HTML Example</h2>
|
36
|
+
|
37
|
+
<pre id="self" class="syntax brush-html"></pre>
|
38
|
+
|
39
|
+
<div style="display: none">
|
40
|
+
You can't see me...... <a href="http://www.google.com/search?q=special+xml+tags+%22%3C%3F%22+%22%3C!%22">or maybe you can?</a>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<p>Here is another example of using a mode-line. The mode-line must be on line 1 or 2 for it to be recognized:</p>
|
44
|
+
|
45
|
+
<pre class="syntax">
|
46
|
+
<!DOCTYPE html>
|
47
|
+
<!--*- mode: html; tab-width: 4; -*-->
|
48
|
+
|
49
|
+
<html lang="en">
|
50
|
+
<head>
|
51
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
52
|
+
<title>My Website</title>
|
53
|
+
</head>
|
54
|
+
<body>
|
55
|
+
<p>Hello <?= "World" ?></p>
|
56
|
+
</body>
|
57
|
+
</html>
|
58
|
+
</code></pre>
|
59
|
+
|
60
|
+
<p>Here is an example of embedded instructions:</p>
|
61
|
+
|
62
|
+
<pre><code class="syntax brush-html"><!DOCTYPE html>
|
63
|
+
|
64
|
+
<html lang="en">
|
65
|
+
<head>
|
66
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
67
|
+
<title>My Website</title>
|
68
|
+
</head>
|
69
|
+
<body>
|
70
|
+
<p>Hello <?= h("World") ?>
|
71
|
+
|
72
|
+
<p>Hello <%= h("ASP...!? WTF???") %>
|
73
|
+
|
74
|
+
<?php
|
75
|
+
// This will print Hello World!
|
76
|
+
echo "Hello World!";
|
77
|
+
setEndOfWorld("tomorrow");
|
78
|
+
?>
|
79
|
+
|
80
|
+
|
81
|
+
<?r if request[:bob] ?>
|
82
|
+
<p>Hello Bob</p>
|
83
|
+
<?r end ?>
|
84
|
+
</body>
|
85
|
+
</html>
|
86
|
+
</code></pre>
|
87
|
+
|
88
|
+
<h2>CDATA sections</h2>
|
89
|
+
|
90
|
+
<pre><code class="syntax html">
|
91
|
+
<description><![CDATA[
|
92
|
+
<h1>Television</h1>
|
93
|
+
|
94
|
+
<p>Brainwashing the masses.</p>
|
95
|
+
]]></description>
|
96
|
+
</code></pre>
|
97
|
+
|
98
|
+
<h2>Apache Configuration (not quite HTML, but similar)</h2>
|
99
|
+
|
100
|
+
<pre><code class="syntax brush-apache">
|
101
|
+
<VirtualHost *>
|
102
|
+
# ... standard configuration ...
|
103
|
+
# ServerName, DocumentRoot, etc
|
104
|
+
|
105
|
+
# Root DAV which requires authentication to access:
|
106
|
+
<Location "/MyFiles/">
|
107
|
+
DAV on
|
108
|
+
AuthType Digest
|
109
|
+
AuthName "Digest Realm"
|
110
|
+
AuthUserFile /etc/apache2/users/myfiles.htdigest
|
111
|
+
Require user me
|
112
|
+
|
113
|
+
<LimitExcept GET HEAD OPTIONS REPORT PROPFIND>
|
114
|
+
Require user me
|
115
|
+
</LimitExcept>
|
116
|
+
</Location>
|
117
|
+
|
118
|
+
# Specific folder which can be accessed anonymously (read-only)
|
119
|
+
<Location "/MyFiles/Public/">
|
120
|
+
<Limit GET HEAD OPTIONS REPORT PROPFIND>
|
121
|
+
Allow from all
|
122
|
+
Satisfy any
|
123
|
+
</Limit>
|
124
|
+
</Location>
|
125
|
+
|
126
|
+
# Specific folder which can be accessed anonymously (read/write)
|
127
|
+
<Location "/MyFiles/DropBox/">
|
128
|
+
Allow from all
|
129
|
+
Satisfy any
|
130
|
+
</Location>
|
131
|
+
</VirtualHost>
|
132
|
+
</code></pre>
|
133
|
+
</body>
|
134
|
+
</html>
|
@@ -0,0 +1,330 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<link rel="stylesheet" href="index.css" type="text/css" media="screen" />
|
5
|
+
|
6
|
+
<script src="jquery-1.6.min.js" type="text/javascript"></script>
|
7
|
+
<script src="../dist/jquery.syntax.js" type="text/javascript"></script>
|
8
|
+
<script src="../dist/jquery.syntax.cache.js" type="text/javascript"></script>
|
9
|
+
|
10
|
+
<script type="text/javascript">
|
11
|
+
$(function() {
|
12
|
+
jQuery.syntax({theme: 'paper', blockLayout: 'fixed'});
|
13
|
+
});
|
14
|
+
</script>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<h1>Syntax: JavaScript</h1>
|
18
|
+
|
19
|
+
<h2>jQuery.Syntax Source Code (3.0)</h2>
|
20
|
+
|
21
|
+
<pre><code class="syntax brush-javascript">/*
|
22
|
+
This file is part of the "jQuery.Syntax" project, and is licensed under the MIT License.
|
23
|
+
For more information, please see http://www.oriontransfer.co.nz/software/jquery-syntax
|
24
|
+
|
25
|
+
Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
|
26
|
+
|
27
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
28
|
+
of this software and associated documentation files (the "Software"), to deal
|
29
|
+
in the Software without restriction, including without limitation the rights
|
30
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
31
|
+
copies of the Software, and to permit persons to whom the Software is
|
32
|
+
furnished to do so, subject to the following conditions:
|
33
|
+
|
34
|
+
The above copyright notice and this permission notice shall be included in
|
35
|
+
all copies or substantial portions of the Software.
|
36
|
+
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
38
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
39
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
40
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
41
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
42
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
43
|
+
THE SOFTWARE.
|
44
|
+
*/
|
45
|
+
|
46
|
+
/*global Function: true, ResourceLoader: true, Syntax: true, alert: false, jQuery: true */
|
47
|
+
|
48
|
+
// ECMAScript 5! Why wasn't this done before!?
|
49
|
+
if (!Function.prototype.bind) {
|
50
|
+
Function.prototype.bind = function (target) {
|
51
|
+
var args = Array.prototype.slice.call(arguments, 1), fn = this;
|
52
|
+
|
53
|
+
return function () {
|
54
|
+
return fn.apply(target, args);
|
55
|
+
};
|
56
|
+
};
|
57
|
+
}
|
58
|
+
|
59
|
+
function ResourceLoader (loader) {
|
60
|
+
this.dependencies = {};
|
61
|
+
this.loading = {};
|
62
|
+
this.loader = loader;
|
63
|
+
}
|
64
|
+
|
65
|
+
ResourceLoader.prototype._finish = function (name) {
|
66
|
+
var deps = this.dependencies[name];
|
67
|
+
|
68
|
+
if (deps) {
|
69
|
+
// I'm not sure if this makes me want to cry... or laugh... or kill!?
|
70
|
+
var chain = this._loaded.bind(this, name);
|
71
|
+
|
72
|
+
for (var i = 0; i < deps.length; i += 1) {
|
73
|
+
chain = this.get.bind(this, deps[i], chain);
|
74
|
+
}
|
75
|
+
|
76
|
+
chain();
|
77
|
+
} else {
|
78
|
+
this._loaded(name);
|
79
|
+
}
|
80
|
+
};
|
81
|
+
|
82
|
+
ResourceLoader.prototype._loaded = function (name) {
|
83
|
+
// When the script has been succesfully loaded, we expect the script
|
84
|
+
// to register with this loader (i.e. this[name]).
|
85
|
+
var resource = this[name], loading = this.loading[name];
|
86
|
+
|
87
|
+
// Clear the loading list
|
88
|
+
this.loading[name] = null;
|
89
|
+
|
90
|
+
if (!resource) {
|
91
|
+
alert("Could not load resource named " + name);
|
92
|
+
} else {
|
93
|
+
for (var i = 0; i < loading.length; i += 1) {
|
94
|
+
loading[i](resource);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
99
|
+
// This function must ensure that current cannot be completely loaded until next
|
100
|
+
// is completely loaded.
|
101
|
+
ResourceLoader.prototype.dependency = function (current, next) {
|
102
|
+
// If the resource has completely loaded, then we don't need to queue it
|
103
|
+
// as a dependency
|
104
|
+
if (this[next] && !this.loading[name]) {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
|
108
|
+
if (this.dependencies[current]) {
|
109
|
+
this.dependencies[current].push(next);
|
110
|
+
} else {
|
111
|
+
this.dependencies[current] = [next];
|
112
|
+
}
|
113
|
+
};
|
114
|
+
|
115
|
+
// This function must be reentrant for the same name and different callbacks.
|
116
|
+
ResourceLoader.prototype.get = function (name, callback) {
|
117
|
+
if (this.loading[name]) {
|
118
|
+
this.loading[name].push(callback)
|
119
|
+
} else if (this[name]) {
|
120
|
+
callback(this[name]);
|
121
|
+
} else {
|
122
|
+
this.loading[name] = [callback];
|
123
|
+
this.loader(name, this._finish.bind(this, name));
|
124
|
+
}
|
125
|
+
};
|
126
|
+
|
127
|
+
var Syntax = {
|
128
|
+
root: null,
|
129
|
+
aliases: {},
|
130
|
+
styles: {},
|
131
|
+
lib: {},
|
132
|
+
defaultOptions: {
|
133
|
+
cacheScripts: true,
|
134
|
+
cacheStyleSheets: true
|
135
|
+
},
|
136
|
+
|
137
|
+
brushes: new ResourceLoader(function (name, callback) {
|
138
|
+
name = Syntax.aliases[name] || name;
|
139
|
+
|
140
|
+
Syntax.getResource('jquery.syntax.brush', name, callback);
|
141
|
+
}),
|
142
|
+
|
143
|
+
layouts: new ResourceLoader(function (name, callback) {
|
144
|
+
Syntax.getResource('jquery.syntax.layout', name, callback);
|
145
|
+
}),
|
146
|
+
|
147
|
+
loader: new ResourceLoader(function (name, callback) {
|
148
|
+
Syntax.getResource('jquery.syntax', name, callback);
|
149
|
+
}),
|
150
|
+
|
151
|
+
getStyles: function (path) {
|
152
|
+
var link = jQuery('<link>');
|
153
|
+
jQuery("head").append(link);
|
154
|
+
|
155
|
+
if (!Syntax.defaultOptions.cacheStyleSheets) {
|
156
|
+
path = path + "?" + Math.random()
|
157
|
+
}
|
158
|
+
|
159
|
+
link.attr({
|
160
|
+
rel: "stylesheet",
|
161
|
+
type: "text/css",
|
162
|
+
href: path
|
163
|
+
});
|
164
|
+
},
|
165
|
+
|
166
|
+
getScript: function (path, callback) {
|
167
|
+
var script = document.createElement('script');
|
168
|
+
|
169
|
+
// Internet Exploder
|
170
|
+
script.onreadystatechange = function() {
|
171
|
+
if (this.onload && (this.readyState == 'loaded' || this.readyState == 'complete')) {
|
172
|
+
this.onload();
|
173
|
+
|
174
|
+
// Ensure the function is only called once.
|
175
|
+
this.onload = null;
|
176
|
+
}
|
177
|
+
};
|
178
|
+
|
179
|
+
// Every other modern browser
|
180
|
+
script.onload = callback;
|
181
|
+
script.type = "text/javascript";
|
182
|
+
|
183
|
+
if (!Syntax.defaultOptions.cacheScripts)
|
184
|
+
path = path + '?' + Math.random()
|
185
|
+
|
186
|
+
script.src = path;
|
187
|
+
|
188
|
+
document.getElementsByTagName('head')[0].appendChild(script);
|
189
|
+
},
|
190
|
+
|
191
|
+
getResource: function (prefix, name, callback) {
|
192
|
+
var basename = prefix + "." + name;
|
193
|
+
|
194
|
+
if (this.styles[basename]) {
|
195
|
+
this.getStyles(this.root + this.styles[basename]);
|
196
|
+
}
|
197
|
+
|
198
|
+
Syntax.getScript(this.root + basename + '.js', callback);
|
199
|
+
},
|
200
|
+
|
201
|
+
alias: function (name, aliases) {
|
202
|
+
Syntax.aliases[name] = name;
|
203
|
+
|
204
|
+
for (var i = 0; i < aliases.length; i += 1) {
|
205
|
+
Syntax.aliases[aliases[i]] = name;
|
206
|
+
}
|
207
|
+
},
|
208
|
+
|
209
|
+
brushAliases: function (brush) {
|
210
|
+
var aliases = [];
|
211
|
+
|
212
|
+
for (var name in Syntax.aliases) {
|
213
|
+
if (Syntax.aliases[name] === brush) {
|
214
|
+
aliases.push(name);
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
return aliases;
|
219
|
+
},
|
220
|
+
|
221
|
+
brushNames: function () {
|
222
|
+
var names = [];
|
223
|
+
|
224
|
+
for (var name in Syntax.aliases) {
|
225
|
+
if (name === Syntax.aliases[name]) {
|
226
|
+
names.push(name);
|
227
|
+
}
|
228
|
+
}
|
229
|
+
|
230
|
+
return names;
|
231
|
+
},
|
232
|
+
|
233
|
+
extractBrushName: function (className) {
|
234
|
+
// brush names are by default lower case - normalize so we can detect it.
|
235
|
+
className = className.toLowerCase();
|
236
|
+
|
237
|
+
var match = className.match(/brush-([\S]+)/);
|
238
|
+
|
239
|
+
if (match) {
|
240
|
+
return match[1];
|
241
|
+
} else {
|
242
|
+
var classes = className.split(/ /);
|
243
|
+
|
244
|
+
if (jQuery.inArray("syntax", classes) !== -1) {
|
245
|
+
for (var i = 0; i < classes.length; i += 1) {
|
246
|
+
var name = Syntax.aliases[classes[i]];
|
247
|
+
|
248
|
+
if (name) {
|
249
|
+
return name;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
return null;
|
256
|
+
},
|
257
|
+
|
258
|
+
detectRoot: function () {
|
259
|
+
if (Syntax.root == null) {
|
260
|
+
// Initialize root based on current script path.
|
261
|
+
var scripts = $('script').filter(function(){
|
262
|
+
return this.src.match(/jquery\.syntax/);
|
263
|
+
});
|
264
|
+
|
265
|
+
var first = scripts.get(0);
|
266
|
+
|
267
|
+
if (first) {
|
268
|
+
// Calculate the basename for the given script src.
|
269
|
+
var root = first.src.match(/.*\//);
|
270
|
+
|
271
|
+
if (root) {
|
272
|
+
Syntax.root = root[0];
|
273
|
+
}
|
274
|
+
}
|
275
|
+
}
|
276
|
+
}
|
277
|
+
};
|
278
|
+
|
279
|
+
jQuery.fn.syntax = function (options, callback) {
|
280
|
+
Syntax.detectRoot();
|
281
|
+
|
282
|
+
var elements = this;
|
283
|
+
|
284
|
+
Syntax.loader.get('core', function () {
|
285
|
+
Syntax.highlight(elements, options, callback);
|
286
|
+
});
|
287
|
+
};
|
288
|
+
|
289
|
+
jQuery.syntax = function (options, callback) {
|
290
|
+
options = options || {};
|
291
|
+
var context = options.context;
|
292
|
+
|
293
|
+
if (options.root) {
|
294
|
+
Syntax.root = options.root;
|
295
|
+
} else {
|
296
|
+
Syntax.detectRoot();
|
297
|
+
}
|
298
|
+
|
299
|
+
options = jQuery.extend(Syntax.defaultOptions, options)
|
300
|
+
|
301
|
+
options.blockSelector = options.blockSelector || 'pre.syntax:not(.highlighted)';
|
302
|
+
options.inlineSelector = options.inlineSelector || 'code.syntax:not(.highlighted)';
|
303
|
+
|
304
|
+
options.blockLayout = options.blockLayout || 'list';
|
305
|
+
options.inlineLayout = options.inlineLayout || 'inline';
|
306
|
+
|
307
|
+
// Allow the user to specify callbacks without replacement.
|
308
|
+
if (typeof options.replace == "undefined")
|
309
|
+
options.replace = true;
|
310
|
+
|
311
|
+
jQuery(options.blockSelector, context).each(function () {
|
312
|
+
jQuery(this).syntax(jQuery.extend({}, options, {
|
313
|
+
brush: Syntax.extractBrushName(this.className),
|
314
|
+
layout: options.blockLayout
|
315
|
+
}), callback);
|
316
|
+
});
|
317
|
+
|
318
|
+
jQuery(options.inlineSelector, context).each(function () {
|
319
|
+
jQuery(this).syntax(jQuery.extend({}, options, {
|
320
|
+
brush: Syntax.extractBrushName(this.className),
|
321
|
+
layout: options.inlineLayout
|
322
|
+
}), callback);
|
323
|
+
});
|
324
|
+
};</code></pre>
|
325
|
+
<h2>Regular Expression</h2>
|
326
|
+
|
327
|
+
<pre><code class="syntax javascript">// Get
|
328
|
+
var x = /.*if_height=(\d+)(?:&|$)/;</code></pre>
|
329
|
+
</body>
|
330
|
+
</html>
|