You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by tv...@apache.org on 2013/09/20 04:29:24 UTC
svn commit: r1524887 [18/34] - in /tomee/tomee/trunk/tomee: ./
tomee-webaccess/ tomee-webaccess/src/ tomee-webaccess/src/main/
tomee-webaccess/src/main/config/ tomee-webaccess/webaccess-gui-libs/
tomee-webaccess/webaccess-gui-libs/backbone/ tomee-webac...
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/index.html
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/index.html?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/index.html (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/index.html Fri Sep 20 02:29:16 2013
@@ -0,0 +1,753 @@
+<!doctype html>
+
+<title>CodeMirror: LESS mode</title>
+<meta charset="utf-8"/>
+<link rel=stylesheet href="../../doc/docs.css">
+
+<link rel="stylesheet" href="../../lib/codemirror.css">
+<link rel="stylesheet" href="../../theme/lesser-dark.css">
+<script src="../../lib/codemirror.js"></script>
+<script src="../../addon/edit/matchbrackets.js"></script>
+<script src="less.js"></script>
+<style>.CodeMirror {background: #f8f8f8; border: 1px solid #ddd; font-size:12px; height: 400px}</style>
+<div id=nav>
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
+
+ <ul>
+ <li><a href="../../index.html">Home</a>
+ <li><a href="../../doc/manual.html">Manual</a>
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
+ </ul>
+ <ul>
+ <li><a href="../index.html">Language modes</a>
+ <li><a class=active href="#">LESS</a>
+ </ul>
+</div>
+
+<article>
+<h2>LESS mode</h2>
+<form><textarea id="code" name="code">@media screen and (device-aspect-ratio: 16/9) { ⦠}
+@media screen and (device-aspect-ratio: 32/18) { ⦠}
+@media screen and (device-aspect-ratio: 1280/720) { ⦠}
+@media screen and (device-aspect-ratio: 2560/1440) { ⦠}
+
+html:lang(fr-be)
+html:lang(de)
+:lang(fr-be) > q
+:lang(de) > q
+
+tr:nth-child(2n+1) /* represents every odd row of an HTML table */
+tr:nth-child(odd) /* same */
+tr:nth-child(2n+0) /* represents every even row of an HTML table */
+tr:nth-child(even) /* same */
+
+/* Alternate paragraph colours in CSS */
+p:nth-child(4n+1) { color: navy; }
+p:nth-child(4n+2) { color: green; }
+p:nth-child(4n+3) { color: maroon; }
+p:nth-child(4n+4) { color: purple; }
+
+:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
+:nth-child(10n+9) /* Same */
+:nth-child(10n+-1) /* Syntactically invalid, and would be ignored */
+
+:nth-child( 3n + 1 )
+:nth-child( +3n - 2 )
+:nth-child( -n+ 6)
+:nth-child( +6 )
+
+html|tr:nth-child(-n+6) /* represents the 6 first rows of XHTML tables */
+
+img:nth-of-type(2n+1) { float: right; }
+img:nth-of-type(2n) { float: left; }
+
+body > h2:nth-of-type(n+2):nth-last-of-type(n+2)
+body > h2:not(:first-of-type):not(:last-of-type)
+
+html|*:not(:link):not(:visited)
+*|*:not(:hover)
+p::first-line { text-transform: uppercase }
+
+p { color: red; font-size: 12pt }
+p::first-letter { color: green; font-size: 200% }
+p::first-line { color: blue }
+
+p { line-height: 1.1 }
+p::first-letter { font-size: 3em; font-weight: normal }
+span { font-weight: bold }
+
+* /* a=0 b=0 c=0 -> specificity = 0 */
+LI /* a=0 b=0 c=1 -> specificity = 1 */
+UL LI /* a=0 b=0 c=2 -> specificity = 2 */
+UL OL+LI /* a=0 b=0 c=3 -> specificity = 3 */
+H1 + *[REL=up] /* a=0 b=1 c=1 -> specificity = 11 */
+UL OL LI.red /* a=0 b=1 c=3 -> specificity = 13 */
+LI.red.level /* a=0 b=2 c=1 -> specificity = 21 */
+#x34y /* a=1 b=0 c=0 -> specificity = 100 */
+#s12:not(FOO) /* a=1 b=0 c=1 -> specificity = 101 */
+
+@namespace foo url(http://www.example.com);
+foo|h1 { color: blue } /* first rule */
+foo|* { color: yellow } /* second rule */
+|h1 { color: red } /* ...*/
+*|h1 { color: green }
+h1 { color: green }
+
+span[hello="Ocean"][goodbye="Land"]
+
+a[rel~="copyright"] { ... }
+a[href="http://www.w3.org/"] { ... }
+
+DIALOGUE[character=romeo]
+DIALOGUE[character=juliet]
+
+[att^=val]
+[att$=val]
+[att*=val]
+
+@namespace foo "http://www.example.com";
+[foo|att=val] { color: blue }
+[*|att] { color: yellow }
+[|att] { color: green }
+[att] { color: green }
+
+
+*:target { color : red }
+*:target::before { content : url(target.png) }
+
+E[foo]{
+ padding:65px;
+}
+E[foo] ~ F{
+ padding:65px;
+}
+E#myid{
+ padding:65px;
+}
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
+ padding: 0;
+ border: 0;
+}
+.btn {
+ // reset here as of 2.0.3 due to Recess property order
+ border-color: #ccc;
+ border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
+}
+fieldset span button, fieldset span input[type="file"] {
+ font-size:12px;
+ font-family:Arial, Helvetica, sans-serif;
+}
+.el tr:nth-child(even):last-child td:first-child{
+ -moz-border-radius-bottomleft:3px;
+ -webkit-border-bottom-left-radius:3px;
+ border-bottom-left-radius:3px;
+}
+
+/* Some LESS code */
+
+button {
+ width: 32px;
+ height: 32px;
+ border: 0;
+ margin: 4px;
+ cursor: pointer;
+}
+button.icon-plus { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#plus) no-repeat; }
+button.icon-chart { background: url(http://dahlström.net/tmp/sharp-icons/svg-icon-target.svg#chart) no-repeat; }
+
+button:hover { background-color: #999; }
+button:active { background-color: #666; }
+
+@test_a: #eeeQQQ;//this is not a valid hex value and thus parsed as an element id
+@test_b: #eeeFFF //this is a valid hex value but the declaration doesn't end with a semicolon and thus parsed as an element id
+
+#eee aaa .box
+{
+ #test bbb {
+ width: 500px;
+ height: 250px;
+ background-image: url(dir/output/sheep.png), url( betweengrassandsky.png );
+ background-position: center bottom, left top;
+ background-repeat: no-repeat;
+ }
+}
+
+@base: #f938ab;
+
+.box-shadow(@style, @c) when (iscolor(@c)) {
+ box-shadow: @style @c;
+ -webkit-box-shadow: @style @c;
+ -moz-box-shadow: @style @c;
+}
+.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
+ .box-shadow(@style, rgba(0, 0, 0, @alpha));
+}
+
+@color: #4D926F;
+
+#header {
+ color: @color;
+ color: #000000;
+}
+h2 {
+ color: @color;
+}
+
+.rounded-corners (@radius: 5px) {
+ border-radius: @radius;
+ -webkit-border-radius: @radius;
+ -moz-border-radius: @radius;
+}
+
+#header {
+ .rounded-corners;
+}
+#footer {
+ .rounded-corners(10px);
+}
+
+.box-shadow (@x: 0, @y: 0, @blur: 1px, @alpha) {
+ @val: @x @y @blur rgba(0, 0, 0, @alpha);
+
+ box-shadow: @val;
+ -webkit-box-shadow: @val;
+ -moz-box-shadow: @val;
+}
+.box { @base: #f938ab;
+ color: saturate(@base, 5%);
+ border-color: lighten(@base, 30%);
+ div { .box-shadow(0, 0, 5px, 0.4) }
+}
+
+@import url("something.css");
+
+@light-blue: hsl(190, 50%, 65%);
+@light-yellow: desaturate(#fefec8, 10%);
+@dark-yellow: desaturate(darken(@light-yellow, 10%), 40%);
+@darkest: hsl(20, 0%, 15%);
+@dark: hsl(190, 20%, 30%);
+@medium: hsl(10, 60%, 30%);
+@light: hsl(90, 40%, 20%);
+@lightest: hsl(90, 20%, 90%);
+@highlight: hsl(80, 50%, 90%);
+@blue: hsl(210, 60%, 20%);
+@alpha-blue: hsla(210, 60%, 40%, 0.5);
+
+.box-shadow (@x, @y, @blur, @alpha) {
+ @value: @x @y @blur rgba(0, 0, 0, @alpha);
+ box-shadow: @value;
+ -moz-box-shadow: @value;
+ -webkit-box-shadow: @value;
+}
+.border-radius (@radius) {
+ border-radius: @radius;
+ -moz-border-radius: @radius;
+ -webkit-border-radius: @radius;
+}
+
+.border-radius (@radius, bottom) {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0;
+ -moz-border-top-right-radius: 0;
+ -moz-border-top-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+ -webkit-border-top-right-radius: 0;
+}
+.border-radius (@radius, right) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0;
+ -moz-border-bottom-left-radius: 0;
+ -moz-border-top-left-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -webkit-border-top-left-radius: 0;
+}
+.box-shadow-inset (@x, @y, @blur, @color) {
+ box-shadow: @x @y @blur @color inset;
+ -moz-box-shadow: @x @y @blur @color inset;
+ -webkit-box-shadow: @x @y @blur @color inset;
+}
+.code () {
+ font-family: 'Bitstream Vera Sans Mono',
+ 'DejaVu Sans Mono',
+ 'Monaco',
+ Courier,
+ monospace !important;
+}
+.wrap () {
+ text-wrap: wrap;
+ white-space: pre-wrap; /* css-3 */
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
+}
+
+html { margin: 0 }
+body {
+ background-color: @darkest;
+ margin: 0 auto;
+ font-family: Arial, sans-serif;
+ font-size: 100%;
+ overflow-x: hidden;
+}
+nav, header, footer, section, article {
+ display: block;
+}
+a {
+ color: #b83000;
+}
+h1 a {
+ color: black;
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
+h1, h2, h3, h4 {
+ margin: 0;
+ font-weight: normal;
+}
+ul, li {
+ list-style-type: none;
+}
+code { .code; }
+code {
+ .string, .regexp { color: @dark }
+ .keyword { font-weight: bold }
+ .comment { color: rgba(0, 0, 0, 0.5) }
+ .number { color: @blue }
+ .class, .special { color: rgba(0, 50, 100, 0.8) }
+}
+pre {
+ padding: 0 30px;
+ .wrap;
+}
+blockquote {
+ font-style: italic;
+}
+body > footer {
+ text-align: left;
+ margin-left: 10px;
+ font-style: italic;
+ font-size: 18px;
+ color: #888;
+}
+
+#logo {
+ margin-top: 30px;
+ margin-bottom: 30px;
+ display: block;
+ width: 199px;
+ height: 81px;
+ background: url(/images/logo.png) no-repeat;
+}
+nav {
+ margin-left: 15px;
+}
+nav a, #dropdown li {
+ display: inline-block;
+ color: white;
+ line-height: 42px;
+ margin: 0;
+ padding: 0px 15px;
+ text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.5);
+ text-decoration: none;
+ border: 2px solid transparent;
+ border-width: 0 2px;
+ &:hover {
+ .dark-red;
+ text-decoration: none;
+ }
+}
+.dark-red {
+ @red: @medium;
+ border: 2px solid darken(@red, 25%);
+ border-left-color: darken(@red, 15%);
+ border-right-color: darken(@red, 15%);
+ border-bottom: 0;
+ border-top: 0;
+ background-color: darken(@red, 10%);
+}
+
+.content {
+ margin: 0 auto;
+ width: 980px;
+}
+
+#menu {
+ position: absolute;
+ width: 100%;
+ z-index: 3;
+ clear: both;
+ display: block;
+ background-color: @blue;
+ height: 42px;
+ border-top: 2px solid lighten(@alpha-blue, 20%);
+ border-bottom: 2px solid darken(@alpha-blue, 25%);
+ .box-shadow(0, 1px, 8px, 0.6);
+ -moz-box-shadow: 0 0 0 #000; // Because firefox sucks.
+
+ &.docked {
+ background-color: hsla(210, 60%, 40%, 0.4);
+ }
+ &:hover {
+ background-color: @blue;
+ }
+
+ #dropdown {
+ margin: 0 0 0 117px;
+ padding: 0;
+ padding-top: 5px;
+ display: none;
+ width: 190px;
+ border-top: 2px solid @medium;
+ color: @highlight;
+ border: 2px solid darken(@medium, 25%);
+ border-left-color: darken(@medium, 15%);
+ border-right-color: darken(@medium, 15%);
+ border-top-width: 0;
+ background-color: darken(@medium, 10%);
+ ul {
+ padding: 0px;
+ }
+ li {
+ font-size: 14px;
+ display: block;
+ text-align: left;
+ padding: 0;
+ border: 0;
+ a {
+ display: block;
+ padding: 0px 15px;
+ text-decoration: none;
+ color: white;
+ &:hover {
+ background-color: darken(@medium, 15%);
+ text-decoration: none;
+ }
+ }
+ }
+ .border-radius(5px, bottom);
+ .box-shadow(0, 6px, 8px, 0.5);
+ }
+}
+
+#main {
+ margin: 0 auto;
+ width: 100%;
+ background-color: @light-blue;
+ border-top: 8px solid darken(@light-blue, 5%);
+
+ #intro {
+ background-color: lighten(@light-blue, 25%);
+ float: left;
+ margin-top: -8px;
+ margin-right: 5px;
+
+ height: 380px;
+ position: relative;
+ z-index: 2;
+ font-family: 'Droid Serif', 'Georgia';
+ width: 395px;
+ padding: 45px 20px 23px 30px;
+ border: 2px dashed darken(@light-blue, 10%);
+ .box-shadow(1px, 0px, 6px, 0.5);
+ border-bottom: 0;
+ border-top: 0;
+ #download { color: transparent; border: 0; float: left; display: inline-block; margin: 15px 0 15px -5px; }
+ #download img { display: inline-block}
+ #download-info {
+ code {
+ font-size: 13px;
+ }
+ color: @blue + #333; display: inline; float: left; margin: 36px 0 0 15px }
+ }
+ h2 {
+ span {
+ color: @medium;
+ }
+ color: @blue;
+ margin: 20px 0;
+ font-size: 24px;
+ line-height: 1.2em;
+ }
+ h3 {
+ color: @blue;
+ line-height: 1.4em;
+ margin: 30px 0 15px 0;
+ font-size: 1em;
+ text-shadow: 0px 0px 0px @lightest;
+ span { color: @medium }
+ }
+ #example {
+ p {
+ font-size: 18px;
+ color: @blue;
+ font-weight: bold;
+ text-shadow: 0px 1px 1px @lightest;
+ }
+ pre {
+ margin: 0;
+ text-shadow: 0 -1px 1px @darkest;
+ margin-top: 20px;
+ background-color: desaturate(@darkest, 8%);
+ border: 0;
+ width: 450px;
+ color: lighten(@lightest, 2%);
+ background-repeat: repeat;
+ padding: 15px;
+ border: 1px dashed @lightest;
+ line-height: 15px;
+ .box-shadow(0, 0px, 15px, 0.5);
+ .code;
+ .border-radius(2px);
+ code .attribute { color: hsl(40, 50%, 70%) }
+ code .variable { color: hsl(120, 10%, 50%) }
+ code .element { color: hsl(170, 20%, 50%) }
+
+ code .string, .regexp { color: hsl(75, 50%, 65%) }
+ code .class { color: hsl(40, 40%, 60%); font-weight: normal }
+ code .id { color: hsl(50, 40%, 60%); font-weight: normal }
+ code .comment { color: rgba(255, 255, 255, 0.2) }
+ code .number, .color { color: hsl(10, 40%, 50%) }
+ code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }
+ #time { color: #aaa }
+ }
+ float: right;
+ font-size: 12px;
+ margin: 0;
+ margin-top: 15px;
+ padding: 0;
+ width: 500px;
+ }
+}
+
+
+.page {
+ .content {
+ width: 870px;
+ padding: 45px;
+ }
+ margin: 0 auto;
+ font-family: 'Georgia', serif;
+ font-size: 18px;
+ line-height: 26px;
+ padding: 0 60px;
+ code {
+ font-size: 16px;
+ }
+ pre {
+ border-width: 1px;
+ border-style: dashed;
+ padding: 15px;
+ margin: 15px 0;
+ }
+ h1 {
+ text-align: left;
+ font-size: 40px;
+ margin-top: 15px;
+ margin-bottom: 35px;
+ }
+ p + h1 { margin-top: 60px }
+ h2, h3 {
+ margin: 30px 0 15px 0;
+ }
+ p + h2, pre + h2, code + h2 {
+ border-top: 6px solid rgba(255, 255, 255, 0.1);
+ padding-top: 30px;
+ }
+ h3 {
+ margin: 15px 0;
+ }
+}
+
+
+#docs {
+ @bg: lighten(@light-blue, 5%);
+ border-top: 2px solid lighten(@bg, 5%);
+ color: @blue;
+ background-color: @light-blue;
+ .box-shadow(0, -2px, 5px, 0.2);
+
+ h1 {
+ font-family: 'Droid Serif', 'Georgia', serif;
+ padding-top: 30px;
+ padding-left: 45px;
+ font-size: 44px;
+ text-align: left;
+ margin: 30px 0 !important;
+ text-shadow: 0px 1px 1px @lightest;
+ font-weight: bold;
+ }
+ .content {
+ clear: both;
+ border-color: transparent;
+ background-color: lighten(@light-blue, 25%);
+ .box-shadow(0, 5px, 5px, 0.4);
+ }
+ pre {
+ @background: lighten(@bg, 30%);
+ color: lighten(@blue, 10%);
+ background-color: @background;
+ border-color: lighten(@light-blue, 25%);
+ border-width: 2px;
+ code .attribute { color: hsl(40, 50%, 30%) }
+ code .variable { color: hsl(120, 10%, 30%) }
+ code .element { color: hsl(170, 20%, 30%) }
+
+ code .string, .regexp { color: hsl(75, 50%, 35%) }
+ code .class { color: hsl(40, 40%, 30%); font-weight: normal }
+ code .id { color: hsl(50, 40%, 30%); font-weight: normal }
+ code .comment { color: rgba(0, 0, 0, 0.4) }
+ code .number, .color { color: hsl(10, 40%, 30%) }
+ code .class, code .mixin, .special { color: hsl(190, 20%, 30%) }
+ }
+ pre code { font-size: 15px }
+ p + h2, pre + h2, code + h2 { border-top-color: rgba(0, 0, 0, 0.1) }
+}
+
+td {
+ padding-right: 30px;
+}
+#synopsis {
+ .box-shadow(0, 5px, 5px, 0.2);
+}
+#synopsis, #about {
+ h2 {
+ font-size: 30px;
+ padding: 10px 0;
+ }
+ h1 + h2 {
+ margin-top: 15px;
+ }
+ h3 { font-size: 22px }
+
+ .code-example {
+ border-spacing: 0;
+ border-width: 1px;
+ border-style: dashed;
+ padding: 0;
+ pre { border: 0; margin: 0 }
+ td {
+ border: 0;
+ margin: 0;
+ background-color: desaturate(darken(@darkest, 5%), 20%);
+ vertical-align: top;
+ padding: 0;
+ }
+ tr { padding: 0 }
+ }
+ .css-output {
+ td {
+ border-left: 0;
+ }
+ }
+ .less-example {
+ //border-right: 1px dotted rgba(255, 255, 255, 0.5) !important;
+ }
+ .css-output, .less-example {
+ width: 390px;
+ }
+ pre {
+ padding: 20px;
+ line-height: 20px;
+ font-size: 14px;
+ }
+}
+#about, #synopsis, #guide {
+ a {
+ text-decoration: none;
+ color: @light-yellow;
+ border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
+ &:hover {
+ text-decoration: none;
+ border-bottom: 1px dashed @light-yellow;
+ }
+ }
+ @bg: desaturate(darken(@darkest, 5%), 20%);
+ text-shadow: 0 -1px 1px lighten(@bg, 5%);
+ color: @highlight;
+ background-color: @bg;
+ .content {
+ background-color: desaturate(@darkest, 20%);
+ clear: both;
+ .box-shadow(0, 5px, 5px, 0.4);
+ }
+ h1, h2, h3 {
+ color: @dark-yellow;
+ }
+ pre {
+ code .attribute { color: hsl(40, 50%, 70%) }
+ code .variable { color: hsl(120, 10%, 50%) }
+ code .element { color: hsl(170, 20%, 50%) }
+
+ code .string, .regexp { color: hsl(75, 50%, 65%) }
+ code .class { color: hsl(40, 40%, 60%); font-weight: normal }
+ code .id { color: hsl(50, 40%, 60%); font-weight: normal }
+ code .comment { color: rgba(255, 255, 255, 0.2) }
+ code .number, .color { color: hsl(10, 40%, 50%) }
+ code .class, code .mixin, .special { color: hsl(190, 20%, 50%) }
+ background-color: @bg;
+ border-color: darken(@light-yellow, 5%);
+ }
+ code {
+ color: darken(@dark-yellow, 5%);
+ .string, .regexp { color: desaturate(@light-blue, 15%) }
+ .keyword { color: hsl(40, 40%, 60%); font-weight: normal }
+ .comment { color: rgba(255, 255, 255, 0.2) }
+ .number { color: lighten(@blue, 10%) }
+ .class, .special { color: hsl(190, 20%, 50%) }
+ }
+}
+#guide {
+ background-color: @darkest;
+ .content {
+ background-color: transparent;
+ }
+
+}
+
+#about {
+ background-color: @darkest !important;
+ .content {
+ background-color: desaturate(lighten(@darkest, 3%), 5%);
+ }
+}
+#synopsis {
+ background-color: desaturate(lighten(@darkest, 3%), 5%) !important;
+ .content {
+ background-color: desaturate(lighten(@darkest, 3%), 5%);
+ }
+ pre {}
+}
+#synopsis, #guide {
+ .content {
+ .box-shadow(0, 0px, 0px, 0.0);
+ }
+}
+#about footer {
+ margin-top: 30px;
+ padding-top: 30px;
+ border-top: 6px solid rgba(0, 0, 0, 0.1);
+ text-align: center;
+ font-size: 16px;
+ color: rgba(255, 255, 255, 0.35);
+ #copy { font-size: 12px }
+ text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.02);
+}
+</textarea></form>
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ theme: "lesser-dark",
+ lineNumbers : true,
+ matchBrackets : true
+ });
+ </script>
+
+ <p><strong>MIME types defined:</strong> <code>text/x-less</code>, <code>text/css</code> (if not previously defined).</p>
+ </article>
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/less.js
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/less.js?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/less.js (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/less/less.js Fri Sep 20 02:29:16 2013
@@ -0,0 +1,258 @@
+/*
+ LESS mode - http://www.lesscss.org/
+ Ported to CodeMirror by Peter Kroon <pl...@gmail.com>
+ Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues GitHub: @peterkroon
+*/
+
+CodeMirror.defineMode("less", function(config) {
+ var indentUnit = config.indentUnit, type;
+ function ret(style, tp) {type = tp; return style;}
+
+ var selectors = /(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/;
+
+ function tokenBase(stream, state) {
+ var ch = stream.next();
+
+ if (ch == "@") {stream.eatWhile(/[\w\-]/); return ret("meta", stream.current());}
+ else if (ch == "/" && stream.eat("*")) {
+ state.tokenize = tokenCComment;
+ return tokenCComment(stream, state);
+ }
+ else if (ch == "<" && stream.eat("!")) {
+ state.tokenize = tokenSGMLComment;
+ return tokenSGMLComment(stream, state);
+ }
+ else if (ch == "=") ret(null, "compare");
+ else if (ch == "|" && stream.eat("=")) return ret(null, "compare");
+ else if (ch == "\"" || ch == "'") {
+ state.tokenize = tokenString(ch);
+ return state.tokenize(stream, state);
+ }
+ else if (ch == "/") { // e.g.: .png will not be parsed as a class
+ if(stream.eat("/")){
+ state.tokenize = tokenSComment;
+ return tokenSComment(stream, state);
+ }else{
+ if(type == "string" || type == "(")return ret("string", "string");
+ if(state.stack[state.stack.length-1] != undefined)return ret(null, ch);
+ stream.eatWhile(/[\a-zA-Z0-9\-_.\s]/);
+ if( /\/|\)|#/.test(stream.peek() || (stream.eatSpace() && stream.peek() == ")")) || stream.eol() )return ret("string", "string"); // let url(/images/logo.png) without quotes return as string
+ }
+ }
+ else if (ch == "!") {
+ stream.match(/^\s*\w*/);
+ return ret("keyword", "important");
+ }
+ else if (/\d/.test(ch)) {
+ stream.eatWhile(/[\w.%]/);
+ return ret("number", "unit");
+ }
+ else if (/[,+<>*\/]/.test(ch)) {
+ if(stream.peek() == "=" || type == "a")return ret("string", "string");
+ return ret(null, "select-op");
+ }
+ else if (/[;{}:\[\]()~\|]/.test(ch)) {
+ if(ch == ":"){
+ stream.eatWhile(/[a-z\\\-]/);
+ if( selectors.test(stream.current()) ){
+ return ret("tag", "tag");
+ }else if(stream.peek() == ":"){//::-webkit-search-decoration
+ stream.next();
+ stream.eatWhile(/[a-z\\\-]/);
+ if(stream.current().match(/\:\:\-(o|ms|moz|webkit)\-/))return ret("string", "string");
+ if( selectors.test(stream.current().substring(1)) )return ret("tag", "tag");
+ return ret(null, ch);
+ }else{
+ return ret(null, ch);
+ }
+ }else if(ch == "~"){
+ if(type == "r")return ret("string", "string");
+ }else{
+ return ret(null, ch);
+ }
+ }
+ else if (ch == ".") {
+ if(type == "(" || type == "string")return ret("string", "string"); // allow url(../image.png)
+ stream.eatWhile(/[\a-zA-Z0-9\-_]/);
+ if(stream.peek() == " ")stream.eatSpace();
+ if(stream.peek() == ")")return ret("number", "unit");//rgba(0,0,0,.25);
+ return ret("tag", "tag");
+ }
+ else if (ch == "#") {
+ //we don't eat white-space, we want the hex color and or id only
+ stream.eatWhile(/[A-Za-z0-9]/);
+ //check if there is a proper hex color length e.g. #eee || #eeeEEE
+ if(stream.current().length == 4 || stream.current().length == 7){
+ if(stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false) != null){//is there a valid hex color value present in the current stream
+ //when not a valid hex value, parse as id
+ if(stream.current().substring(1) != stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false))return ret("atom", "tag");
+ //eat white-space
+ stream.eatSpace();
+ //when hex value declaration doesn't end with [;,] but is does with a slash/cc comment treat it as an id, just like the other hex values that don't end with[;,]
+ if( /[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(stream.peek()) )return ret("atom", "tag");
+ //#time { color: #aaa }
+ else if(stream.peek() == "}" )return ret("number", "unit");
+ //we have a valid hex color value, parse as id whenever an element/class is defined after the hex(id) value e.g. #eee aaa || #eee .aaa
+ else if( /[a-zA-Z\\]/.test(stream.peek()) )return ret("atom", "tag");
+ //when a hex value is on the end of a line, parse as id
+ else if(stream.eol())return ret("atom", "tag");
+ //default
+ else return ret("number", "unit");
+ }else{//when not a valid hexvalue in the current stream e.g. #footer
+ stream.eatWhile(/[\w\\\-]/);
+ return ret("atom", "tag");
+ }
+ }else{//when not a valid hexvalue length
+ stream.eatWhile(/[\w\\\-]/);
+ return ret("atom", "tag");
+ }
+ }
+ else if (ch == "&") {
+ stream.eatWhile(/[\w\-]/);
+ return ret(null, ch);
+ }
+ else {
+ stream.eatWhile(/[\w\\\-_%.{]/);
+ if(type == "string"){
+ return ret("string", "string");
+ }else if(stream.current().match(/(^http$|^https$)/) != null){
+ stream.eatWhile(/[\w\\\-_%.{:\/]/);
+ return ret("string", "string");
+ }else if(stream.peek() == "<" || stream.peek() == ">"){
+ return ret("tag", "tag");
+ }else if( /\(/.test(stream.peek()) ){
+ return ret(null, ch);
+ }else if (stream.peek() == "/" && state.stack[state.stack.length-1] != undefined){ // url(dir/center/image.png)
+ return ret("string", "string");
+ }else if( stream.current().match(/\-\d|\-.\d/) ){ // match e.g.: -5px -0.4 etc... only colorize the minus sign
+ //commment out these 2 comment if you want the minus sign to be parsed as null -500px
+ //stream.backUp(stream.current().length-1);
+ //return ret(null, ch); //console.log( stream.current() );
+ return ret("number", "unit");
+ }else if( /\/|[\s\)]/.test(stream.peek() || stream.eol() || (stream.eatSpace() && stream.peek() == "/")) && stream.current().indexOf(".") !== -1){
+ if(stream.current().substring(stream.current().length-1,stream.current().length) == "{"){
+ stream.backUp(1);
+ return ret("tag", "tag");
+ }//end if
+ stream.eatSpace();
+ if( /[{<>.a-zA-Z\/]/.test(stream.peek()) || stream.eol() )return ret("tag", "tag"); // e.g. button.icon-plus
+ return ret("string", "string"); // let url(/images/logo.png) without quotes return as string
+ }else if( stream.eol() || stream.peek() == "[" || stream.peek() == "#" || type == "tag" ){
+ if(stream.current().substring(stream.current().length-1,stream.current().length) == "{")stream.backUp(1);
+ return ret("tag", "tag");
+ }else if(type == "compare" || type == "a" || type == "("){
+ return ret("string", "string");
+ }else if(type == "|" || stream.current() == "-" || type == "["){
+ return ret(null, ch);
+ }else if(stream.peek() == ":") {
+ stream.next();
+ var t_v = stream.peek() == ":" ? true : false;
+ if(!t_v){
+ var old_pos = stream.pos;
+ var sc = stream.current().length;
+ stream.eatWhile(/[a-z\\\-]/);
+ var new_pos = stream.pos;
+ if(stream.current().substring(sc-1).match(selectors) != null){
+ stream.backUp(new_pos-(old_pos-1));
+ return ret("tag", "tag");
+ } else stream.backUp(new_pos-(old_pos-1));
+ }else{
+ stream.backUp(1);
+ }
+ if(t_v)return ret("tag", "tag"); else return ret("variable", "variable");
+ }else{
+ return ret("variable", "variable");
+ }
+ }
+ }
+
+ function tokenSComment(stream, state) { // SComment = Slash comment
+ stream.skipToEnd();
+ state.tokenize = tokenBase;
+ return ret("comment", "comment");
+ }
+
+ function tokenCComment(stream, state) {
+ var maybeEnd = false, ch;
+ while ((ch = stream.next()) != null) {
+ if (maybeEnd && ch == "/") {
+ state.tokenize = tokenBase;
+ break;
+ }
+ maybeEnd = (ch == "*");
+ }
+ return ret("comment", "comment");
+ }
+
+ function tokenSGMLComment(stream, state) {
+ var dashes = 0, ch;
+ while ((ch = stream.next()) != null) {
+ if (dashes >= 2 && ch == ">") {
+ state.tokenize = tokenBase;
+ break;
+ }
+ dashes = (ch == "-") ? dashes + 1 : 0;
+ }
+ return ret("comment", "comment");
+ }
+
+ function tokenString(quote) {
+ return function(stream, state) {
+ var escaped = false, ch;
+ while ((ch = stream.next()) != null) {
+ if (ch == quote && !escaped)
+ break;
+ escaped = !escaped && ch == "\\";
+ }
+ if (!escaped) state.tokenize = tokenBase;
+ return ret("string", "string");
+ };
+ }
+
+ return {
+ startState: function(base) {
+ return {tokenize: tokenBase,
+ baseIndent: base || 0,
+ stack: []};
+ },
+
+ token: function(stream, state) {
+ if (stream.eatSpace()) return null;
+ var style = state.tokenize(stream, state);
+
+ var context = state.stack[state.stack.length-1];
+ if (type == "hash" && context == "rule") style = "atom";
+ else if (style == "variable") {
+ if (context == "rule") style = null; //"tag"
+ else if (!context || context == "@media{") {
+ style = stream.current() == "when" ? "variable" :
+ /[\s,|\s\)|\s]/.test(stream.peek()) ? "tag" : type;
+ }
+ }
+
+ if (context == "rule" && /^[\{\};]$/.test(type))
+ state.stack.pop();
+ if (type == "{") {
+ if (context == "@media") state.stack[state.stack.length-1] = "@media{";
+ else state.stack.push("{");
+ }
+ else if (type == "}") state.stack.pop();
+ else if (type == "@media") state.stack.push("@media");
+ else if (context == "{" && type != "comment") state.stack.push("rule");
+ return style;
+ },
+
+ indent: function(state, textAfter) {
+ var n = state.stack.length;
+ if (/^\}/.test(textAfter))
+ n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
+ return state.baseIndent + n * indentUnit;
+ },
+
+ electricChars: "}"
+ };
+});
+
+CodeMirror.defineMIME("text/x-less", "less");
+if (!CodeMirror.mimeModes.hasOwnProperty("text/css"))
+ CodeMirror.defineMIME("text/css", "less");
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/index.html
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/index.html?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/index.html (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/index.html Fri Sep 20 02:29:16 2013
@@ -0,0 +1,459 @@
+<!doctype html>
+
+<title>CodeMirror: LiveScript mode</title>
+<meta charset="utf-8"/>
+<link rel=stylesheet href="../../doc/docs.css">
+
+<link rel="stylesheet" href="../../lib/codemirror.css">
+<link rel="stylesheet" href="../../theme/solarized.css">
+<script src="../../lib/codemirror.js"></script>
+<script src="livescript.js"></script>
+<style>.CodeMirror {font-size: 80%;border-top: 1px solid silver; border-bottom: 1px solid silver;}</style>
+<div id=nav>
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
+
+ <ul>
+ <li><a href="../../index.html">Home</a>
+ <li><a href="../../doc/manual.html">Manual</a>
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
+ </ul>
+ <ul>
+ <li><a href="../index.html">Language modes</a>
+ <li><a class=active href="#">LiveScript</a>
+ </ul>
+</div>
+
+<article>
+<h2>LiveScript mode</h2>
+<form><textarea id="code" name="code">
+# LiveScript mode for CodeMirror
+# The following script, prelude.ls, is used to
+# demonstrate LiveScript mode for CodeMirror.
+# https://github.com/gkz/prelude-ls
+
+export objToFunc = objToFunc = (obj) ->
+ (key) -> obj[key]
+
+export each = (f, xs) -->
+ if typeof! xs is \Object
+ for , x of xs then f x
+ else
+ for x in xs then f x
+ xs
+
+export map = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ type = typeof! xs
+ if type is \Object
+ {[key, f x] for key, x of xs}
+ else
+ result = [f x for x in xs]
+ if type is \String then result * '' else result
+
+export filter = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ type = typeof! xs
+ if type is \Object
+ {[key, x] for key, x of xs when f x}
+ else
+ result = [x for x in xs when f x]
+ if type is \String then result * '' else result
+
+export reject = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ type = typeof! xs
+ if type is \Object
+ {[key, x] for key, x of xs when not f x}
+ else
+ result = [x for x in xs when not f x]
+ if type is \String then result * '' else result
+
+export partition = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ type = typeof! xs
+ if type is \Object
+ passed = {}
+ failed = {}
+ for key, x of xs
+ (if f x then passed else failed)[key] = x
+ else
+ passed = []
+ failed = []
+ for x in xs
+ (if f x then passed else failed)push x
+ if type is \String
+ passed *= ''
+ failed *= ''
+ [passed, failed]
+
+export find = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ if typeof! xs is \Object
+ for , x of xs when f x then return x
+ else
+ for x in xs when f x then return x
+ void
+
+export head = export first = (xs) ->
+ return void if not xs.length
+ xs.0
+
+export tail = (xs) ->
+ return void if not xs.length
+ xs.slice 1
+
+export last = (xs) ->
+ return void if not xs.length
+ xs[*-1]
+
+export initial = (xs) ->
+ return void if not xs.length
+ xs.slice 0 xs.length - 1
+
+export empty = (xs) ->
+ if typeof! xs is \Object
+ for x of xs then return false
+ return yes
+ not xs.length
+
+export values = (obj) ->
+ [x for , x of obj]
+
+export keys = (obj) ->
+ [x for x of obj]
+
+export len = (xs) ->
+ xs = values xs if typeof! xs is \Object
+ xs.length
+
+export cons = (x, xs) -->
+ if typeof! xs is \String then x + xs else [x] ++ xs
+
+export append = (xs, ys) -->
+ if typeof! ys is \String then xs + ys else xs ++ ys
+
+export join = (sep, xs) -->
+ xs = values xs if typeof! xs is \Object
+ xs.join sep
+
+export reverse = (xs) ->
+ if typeof! xs is \String
+ then (xs / '')reverse! * ''
+ else xs.slice!reverse!
+
+export fold = export foldl = (f, memo, xs) -->
+ if typeof! xs is \Object
+ for , x of xs then memo = f memo, x
+ else
+ for x in xs then memo = f memo, x
+ memo
+
+export fold1 = export foldl1 = (f, xs) --> fold f, xs.0, xs.slice 1
+
+export foldr = (f, memo, xs) --> fold f, memo, xs.slice!reverse!
+
+export foldr1 = (f, xs) -->
+ xs.=slice!reverse!
+ fold f, xs.0, xs.slice 1
+
+export unfoldr = export unfold = (f, b) -->
+ if (f b)?
+ [that.0] ++ unfoldr f, that.1
+ else
+ []
+
+export andList = (xs) ->
+ for x in xs when not x
+ return false
+ true
+
+export orList = (xs) ->
+ for x in xs when x
+ return true
+ false
+
+export any = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ for x in xs when f x
+ return yes
+ no
+
+export all = (f, xs) -->
+ f = objToFunc f if typeof! f isnt \Function
+ for x in xs when not f x
+ return no
+ yes
+
+export unique = (xs) ->
+ result = []
+ if typeof! xs is \Object
+ for , x of xs when x not in result then result.push x
+ else
+ for x in xs when x not in result then result.push x
+ if typeof! xs is \String then result * '' else result
+
+export sort = (xs) ->
+ xs.concat!sort (x, y) ->
+ | x > y => 1
+ | x < y => -1
+ | _ => 0
+
+export sortBy = (f, xs) -->
+ return [] unless xs.length
+ xs.concat!sort f
+
+export compare = (f, x, y) -->
+ | (f x) > (f y) => 1
+ | (f x) < (f y) => -1
+ | otherwise => 0
+
+export sum = (xs) ->
+ result = 0
+ if typeof! xs is \Object
+ for , x of xs then result += x
+ else
+ for x in xs then result += x
+ result
+
+export product = (xs) ->
+ result = 1
+ if typeof! xs is \Object
+ for , x of xs then result *= x
+ else
+ for x in xs then result *= x
+ result
+
+export mean = export average = (xs) -> (sum xs) / len xs
+
+export concat = (xss) -> fold append, [], xss
+
+export concatMap = (f, xs) --> fold ((memo, x) -> append memo, f x), [], xs
+
+export listToObj = (xs) ->
+ {[x.0, x.1] for x in xs}
+
+export maximum = (xs) -> fold1 (>?), xs
+
+export minimum = (xs) -> fold1 (<?), xs
+
+export scan = export scanl = (f, memo, xs) -->
+ last = memo
+ if typeof! xs is \Object
+ then [memo] ++ [last = f last, x for , x of xs]
+ else [memo] ++ [last = f last, x for x in xs]
+
+export scan1 = export scanl1 = (f, xs) --> scan f, xs.0, xs.slice 1
+
+export scanr = (f, memo, xs) -->
+ xs.=slice!reverse!
+ scan f, memo, xs .reverse!
+
+export scanr1 = (f, xs) -->
+ xs.=slice!reverse!
+ scan f, xs.0, xs.slice 1 .reverse!
+
+export replicate = (n, x) -->
+ result = []
+ i = 0
+ while i < n, ++i then result.push x
+ result
+
+export take = (n, xs) -->
+ | n <= 0
+ if typeof! xs is \String then '' else []
+ | not xs.length => xs
+ | otherwise => xs.slice 0, n
+
+export drop = (n, xs) -->
+ | n <= 0 => xs
+ | not xs.length => xs
+ | otherwise => xs.slice n
+
+export splitAt = (n, xs) --> [(take n, xs), (drop n, xs)]
+
+export takeWhile = (p, xs) -->
+ return xs if not xs.length
+ p = objToFunc p if typeof! p isnt \Function
+ result = []
+ for x in xs
+ break if not p x
+ result.push x
+ if typeof! xs is \String then result * '' else result
+
+export dropWhile = (p, xs) -->
+ return xs if not xs.length
+ p = objToFunc p if typeof! p isnt \Function
+ i = 0
+ for x in xs
+ break if not p x
+ ++i
+ drop i, xs
+
+export span = (p, xs) --> [(takeWhile p, xs), (dropWhile p, xs)]
+
+export breakIt = (p, xs) --> span (not) << p, xs
+
+export zip = (xs, ys) -->
+ result = []
+ for zs, i in [xs, ys]
+ for z, j in zs
+ result.push [] if i is 0
+ result[j]?push z
+ result
+
+export zipWith = (f,xs, ys) -->
+ f = objToFunc f if typeof! f isnt \Function
+ if not xs.length or not ys.length
+ []
+ else
+ [f.apply this, zs for zs in zip.call this, xs, ys]
+
+export zipAll = (...xss) ->
+ result = []
+ for xs, i in xss
+ for x, j in xs
+ result.push [] if i is 0
+ result[j]?push x
+ result
+
+export zipAllWith = (f, ...xss) ->
+ f = objToFunc f if typeof! f isnt \Function
+ if not xss.0.length or not xss.1.length
+ []
+ else
+ [f.apply this, xs for xs in zipAll.apply this, xss]
+
+export compose = (...funcs) ->
+ ->
+ args = arguments
+ for f in funcs
+ args = [f.apply this, args]
+ args.0
+
+export curry = (f) ->
+ curry$ f # using util method curry$ from livescript
+
+export id = (x) -> x
+
+export flip = (f, x, y) --> f y, x
+
+export fix = (f) ->
+ ( (g, x) -> -> f(g g) ...arguments ) do
+ (g, x) -> -> f(g g) ...arguments
+
+export lines = (str) ->
+ return [] if not str.length
+ str / \\n
+
+export unlines = (strs) -> strs * \\n
+
+export words = (str) ->
+ return [] if not str.length
+ str / /[ ]+/
+
+export unwords = (strs) -> strs * ' '
+
+export max = (>?)
+
+export min = (<?)
+
+export negate = (x) -> -x
+
+export abs = Math.abs
+
+export signum = (x) ->
+ | x < 0 => -1
+ | x > 0 => 1
+ | otherwise => 0
+
+export quot = (x, y) --> ~~(x / y)
+
+export rem = (%)
+
+export div = (x, y) --> Math.floor x / y
+
+export mod = (%%)
+
+export recip = (1 /)
+
+export pi = Math.PI
+
+export tau = pi * 2
+
+export exp = Math.exp
+
+export sqrt = Math.sqrt
+
+# changed from log as log is a
+# common function for logging things
+export ln = Math.log
+
+export pow = (^)
+
+export sin = Math.sin
+
+export tan = Math.tan
+
+export cos = Math.cos
+
+export asin = Math.asin
+
+export acos = Math.acos
+
+export atan = Math.atan
+
+export atan2 = (x, y) --> Math.atan2 x, y
+
+# sinh
+# tanh
+# cosh
+# asinh
+# atanh
+# acosh
+
+export truncate = (x) -> ~~x
+
+export round = Math.round
+
+export ceiling = Math.ceil
+
+export floor = Math.floor
+
+export isItNaN = (x) -> x isnt x
+
+export even = (x) -> x % 2 == 0
+
+export odd = (x) -> x % 2 != 0
+
+export gcd = (x, y) -->
+ x = Math.abs x
+ y = Math.abs y
+ until y is 0
+ z = x % y
+ x = y
+ y = z
+ x
+
+export lcm = (x, y) -->
+ Math.abs Math.floor (x / (gcd x, y) * y)
+
+# meta
+export installPrelude = !(target) ->
+ unless target.prelude?isInstalled
+ target <<< out$ # using out$ generated by livescript
+ target <<< target.prelude.isInstalled = true
+
+export prelude = out$
+</textarea></form>
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ theme: "solarized light",
+ lineNumbers: true
+ });
+ </script>
+
+ <p><strong>MIME types defined:</strong> <code>text/x-livescript</code>.</p>
+
+ <p>The LiveScript mode was written by Kenneth Bentley (<a href="LICENSE">license</a>).</p>
+
+ </article>
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.js
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.js?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.js (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.js Fri Sep 20 02:29:16 2013
@@ -0,0 +1,267 @@
+/**
+ * Link to the project's GitHub page:
+ * https://github.com/duralog/CodeMirror
+ */
+(function() {
+ CodeMirror.defineMode('livescript', function(){
+ var tokenBase, external;
+ tokenBase = function(stream, state){
+ var next_rule, nr, i$, len$, r, m;
+ if (next_rule = state.next || 'start') {
+ state.next = state.next;
+ if (Array.isArray(nr = Rules[next_rule])) {
+ for (i$ = 0, len$ = nr.length; i$ < len$; ++i$) {
+ r = nr[i$];
+ if (r.regex && (m = stream.match(r.regex))) {
+ state.next = r.next;
+ return r.token;
+ }
+ }
+ stream.next();
+ return 'error';
+ }
+ if (stream.match(r = Rules[next_rule])) {
+ if (r.regex && stream.match(r.regex)) {
+ state.next = r.next;
+ return r.token;
+ } else {
+ stream.next();
+ return 'error';
+ }
+ }
+ }
+ stream.next();
+ return 'error';
+ };
+ external = {
+ startState: function(){
+ return {
+ next: 'start',
+ lastToken: null
+ };
+ },
+ token: function(stream, state){
+ var style;
+ style = tokenBase(stream, state);
+ state.lastToken = {
+ style: style,
+ indent: stream.indentation(),
+ content: stream.current()
+ };
+ return style.replace(/\./g, ' ');
+ },
+ indent: function(state){
+ var indentation;
+ indentation = state.lastToken.indent;
+ if (state.lastToken.content.match(indenter)) {
+ indentation += 2;
+ }
+ return indentation;
+ }
+ };
+ return external;
+ });
+
+ var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
+ var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
+ var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
+ var stringfill = {
+ token: 'string',
+ regex: '.+'
+ };
+ var Rules = {
+ start: [
+ {
+ token: 'comment.doc',
+ regex: '/\\*',
+ next: 'comment'
+ }, {
+ token: 'comment',
+ regex: '#.*'
+ }, {
+ token: 'keyword',
+ regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
+ }, {
+ token: 'constant.language',
+ regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
+ }, {
+ token: 'invalid.illegal',
+ regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
+ }, {
+ token: 'language.support.class',
+ regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
+ }, {
+ token: 'language.support.function',
+ regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
+ }, {
+ token: 'variable.language',
+ regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
+ }, {
+ token: 'identifier',
+ regex: identifier + '\\s*:(?![:=])'
+ }, {
+ token: 'variable',
+ regex: identifier
+ }, {
+ token: 'keyword.operator',
+ regex: '(?:\\.{3}|\\s+\\?)'
+ }, {
+ token: 'keyword.variable',
+ regex: '(?:@+|::|\\.\\.)',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '\\.\\s*',
+ next: 'key'
+ }, {
+ token: 'string',
+ regex: '\\\\\\S[^\\s,;)}\\]]*'
+ }, {
+ token: 'string.doc',
+ regex: '\'\'\'',
+ next: 'qdoc'
+ }, {
+ token: 'string.doc',
+ regex: '"""',
+ next: 'qqdoc'
+ }, {
+ token: 'string',
+ regex: '\'',
+ next: 'qstring'
+ }, {
+ token: 'string',
+ regex: '"',
+ next: 'qqstring'
+ }, {
+ token: 'string',
+ regex: '`',
+ next: 'js'
+ }, {
+ token: 'string',
+ regex: '<\\[',
+ next: 'words'
+ }, {
+ token: 'string.regex',
+ regex: '//',
+ next: 'heregex'
+ }, {
+ token: 'string.regex',
+ regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
+ next: 'key'
+ }, {
+ token: 'constant.numeric',
+ regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
+ }, {
+ token: 'lparen',
+ regex: '[({[]'
+ }, {
+ token: 'rparen',
+ regex: '[)}\\]]',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '\\S+'
+ }, {
+ token: 'text',
+ regex: '\\s+'
+ }
+ ],
+ heregex: [
+ {
+ token: 'string.regex',
+ regex: '.*?//[gimy$?]{0,4}',
+ next: 'start'
+ }, {
+ token: 'string.regex',
+ regex: '\\s*#{'
+ }, {
+ token: 'comment.regex',
+ regex: '\\s+(?:#.*)?'
+ }, {
+ token: 'string.regex',
+ regex: '\\S+'
+ }
+ ],
+ key: [
+ {
+ token: 'keyword.operator',
+ regex: '[.?@!]+'
+ }, {
+ token: 'identifier',
+ regex: identifier,
+ next: 'start'
+ }, {
+ token: 'text',
+ regex: '.',
+ next: 'start'
+ }
+ ],
+ comment: [
+ {
+ token: 'comment.doc',
+ regex: '.*?\\*/',
+ next: 'start'
+ }, {
+ token: 'comment.doc',
+ regex: '.+'
+ }
+ ],
+ qdoc: [
+ {
+ token: 'string',
+ regex: ".*?'''",
+ next: 'key'
+ }, stringfill
+ ],
+ qqdoc: [
+ {
+ token: 'string',
+ regex: '.*?"""',
+ next: 'key'
+ }, stringfill
+ ],
+ qstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
+ next: 'key'
+ }, stringfill
+ ],
+ qqstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next: 'key'
+ }, stringfill
+ ],
+ js: [
+ {
+ token: 'string',
+ regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
+ next: 'key'
+ }, stringfill
+ ],
+ words: [
+ {
+ token: 'string',
+ regex: '.*?\\]>',
+ next: 'key'
+ }, stringfill
+ ]
+ };
+ for (var idx in Rules) {
+ var r = Rules[idx];
+ if (Array.isArray(r)) {
+ for (var i = 0, len = r.length; i < len; ++i) {
+ var rr = r[i];
+ if (rr.regex) {
+ Rules[idx][i].regex = new RegExp('^' + rr.regex);
+ }
+ }
+ } else if (r.regex) {
+ Rules[idx].regex = new RegExp('^' + r.regex);
+ }
+ }
+})();
+
+CodeMirror.defineMIME('text/x-livescript', 'livescript');
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.ls
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.ls?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.ls (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/livescript/livescript.ls Fri Sep 20 02:29:16 2013
@@ -0,0 +1,266 @@
+/**
+ * Link to the project's GitHub page:
+ * https://github.com/duralog/CodeMirror
+ */
+CodeMirror.defineMode 'livescript', (conf) ->
+ tokenBase = (stream, state) ->
+ #indent =
+ if next_rule = state.next or \start
+ state.next = state.next
+ if Array.isArray nr = Rules[next_rule]
+ for r in nr
+ if r.regex and m = stream.match r.regex
+ state.next = r.next
+ return r.token
+ stream.next!
+ return \error
+ if stream.match r = Rules[next_rule]
+ if r.regex and stream.match r.regex
+ state.next = r.next
+ return r.token
+ else
+ stream.next!
+ return \error
+ stream.next!
+ return 'error'
+ external = {
+ startState: (basecolumn) ->
+ {
+ next: \start
+ lastToken: null
+ }
+ token: (stream, state) ->
+ style = tokenBase stream, state #tokenLexer stream, state
+ state.lastToken = {
+ style: style
+ indent: stream.indentation!
+ content: stream.current!
+ }
+ style.replace /\./g, ' '
+ indent: (state, textAfter) ->
+ # XXX this won't work with backcalls
+ indentation = state.lastToken.indent
+ if state.lastToken.content.match indenter then indentation += 2
+ return indentation
+ }
+ external
+
+### Highlight Rules
+# taken from mode-ls.ls
+
+indenter = // (?
+ : [({[=:]
+ | [-~]>
+ | \b (?: e(?:lse|xport) | d(?:o|efault) | t(?:ry|hen) | finally |
+ import (?:\s* all)? | const | var |
+ let | new | catch (?:\s* #identifier)? )
+ ) \s* $ //
+
+identifier = /(?![\d\s])[$\w\xAA-\uFFDC](?:(?!\s)[$\w\xAA-\uFFDC]|-[A-Za-z])*/$
+keywordend = /(?![$\w]|-[A-Za-z]|\s*:(?![:=]))/$
+stringfill = token: \string, regex: '.+'
+
+Rules =
+ start:
+ * token: \comment.doc
+ regex: '/\\*'
+ next : \comment
+
+ * token: \comment
+ regex: '#.*'
+
+ * token: \keyword
+ regex: //(?
+ :t(?:h(?:is|row|en)|ry|ypeof!?)
+ |c(?:on(?:tinue|st)|a(?:se|tch)|lass)
+ |i(?:n(?:stanceof)?|mp(?:ort(?:\s+all)?|lements)|[fs])
+ |d(?:e(?:fault|lete|bugger)|o)
+ |f(?:or(?:\s+own)?|inally|unction)
+ |s(?:uper|witch)
+ |e(?:lse|x(?:tends|port)|val)
+ |a(?:nd|rguments)
+ |n(?:ew|ot)
+ |un(?:less|til)
+ |w(?:hile|ith)
+ |o[fr]|return|break|let|var|loop
+ )//$ + keywordend
+
+ * token: \constant.language
+ regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
+
+ * token: \invalid.illegal
+ regex: '(?
+ :p(?:ackage|r(?:ivate|otected)|ublic)
+ |i(?:mplements|nterface)
+ |enum|static|yield
+ )' + keywordend
+
+ * token: \language.support.class
+ regex: '(?
+ :R(?:e(?:gExp|ferenceError)|angeError)
+ |S(?:tring|yntaxError)
+ |E(?:rror|valError)
+ |Array|Boolean|Date|Function|Number|Object|TypeError|URIError
+ )' + keywordend
+
+ * token: \language.support.function
+ regex: '(?
+ :is(?:NaN|Finite)
+ |parse(?:Int|Float)
+ |Math|JSON
+ |(?:en|de)codeURI(?:Component)?
+ )' + keywordend
+
+ * token: \variable.language
+ regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
+
+ * token: \identifier
+ regex: identifier + /\s*:(?![:=])/$
+
+ * token: \variable
+ regex: identifier
+
+ * token: \keyword.operator
+ regex: /(?:\.{3}|\s+\?)/$
+
+ * token: \keyword.variable
+ regex: /(?:@+|::|\.\.)/$
+ next : \key
+
+ * token: \keyword.operator
+ regex: /\.\s*/$
+ next : \key
+
+ * token: \string
+ regex: /\\\S[^\s,;)}\]]*/$
+
+ * token: \string.doc
+ regex: \'''
+ next : \qdoc
+
+ * token: \string.doc
+ regex: \"""
+ next : \qqdoc
+
+ * token: \string
+ regex: \'
+ next : \qstring
+
+ * token: \string
+ regex: \"
+ next : \qqstring
+
+ * token: \string
+ regex: \`
+ next : \js
+
+ * token: \string
+ regex: '<\\['
+ next : \words
+
+ * token: \string.regex
+ regex: \//
+ next : \heregex
+
+ * token: \string.regex
+ regex: //
+ /(?: [^ [ / \n \\ ]*
+ (?: (?: \\.
+ | \[ [^\]\n\\]* (?:\\.[^\]\n\\]*)* \]
+ ) [^ [ / \n \\ ]*
+ )*
+ )/ [gimy$]{0,4}
+ //$
+ next : \key
+
+ * token: \constant.numeric
+ regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*
+ |(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*
+ |(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)
+ (?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
+
+ * token: \lparen
+ regex: '[({[]'
+
+ * token: \rparen
+ regex: '[)}\\]]'
+ next : \key
+
+ * token: \keyword.operator
+ regex: \\\S+
+
+ * token: \text
+ regex: \\\s+
+
+ heregex:
+ * token: \string.regex
+ regex: '.*?//[gimy$?]{0,4}'
+ next : \start
+ * token: \string.regex
+ regex: '\\s*#{'
+ * token: \comment.regex
+ regex: '\\s+(?:#.*)?'
+ * token: \string.regex
+ regex: '\\S+'
+
+ key:
+ * token: \keyword.operator
+ regex: '[.?@!]+'
+ * token: \identifier
+ regex: identifier
+ next : \start
+ * token: \text
+ regex: '.'
+ next : \start
+
+ comment:
+ * token: \comment.doc
+ regex: '.*?\\*/'
+ next : \start
+ * token: \comment.doc
+ regex: '.+'
+
+ qdoc:
+ token: \string
+ regex: ".*?'''"
+ next : \key
+ stringfill
+
+ qqdoc:
+ token: \string
+ regex: '.*?"""'
+ next : \key
+ stringfill
+
+ qstring:
+ token: \string
+ regex: /[^\\']*(?:\\.[^\\']*)*'/$
+ next : \key
+ stringfill
+
+ qqstring:
+ token: \string
+ regex: /[^\\"]*(?:\\.[^\\"]*)*"/$
+ next : \key
+ stringfill
+
+ js:
+ token: \string
+ regex: /[^\\`]*(?:\\.[^\\`]*)*`/$
+ next : \key
+ stringfill
+
+ words:
+ token: \string
+ regex: '.*?\\]>'
+ next : \key
+ stringfill
+
+# for optimization, precompile the regexps
+for idx, r of Rules
+ if Array.isArray r
+ for rr, i in r
+ if rr.regex then Rules[idx][i].regex = new RegExp '^'+rr.regex
+ else if r.regex then Rules[idx].regex = new RegExp '^'+r.regex
+
+CodeMirror.defineMIME 'text/x-livescript', 'livescript'
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/index.html
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/index.html?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/index.html (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/index.html Fri Sep 20 02:29:16 2013
@@ -0,0 +1,86 @@
+<!doctype html>
+
+<title>CodeMirror: Lua mode</title>
+<meta charset="utf-8"/>
+<link rel=stylesheet href="../../doc/docs.css">
+
+<link rel="stylesheet" href="../../lib/codemirror.css">
+<link rel="stylesheet" href="../../theme/neat.css">
+<script src="../../addon/edit/matchbrackets.js"></script>
+<script src="../../lib/codemirror.js"></script>
+<script src="lua.js"></script>
+<style>.CodeMirror {border: 1px solid black;}</style>
+<div id=nav>
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
+
+ <ul>
+ <li><a href="../../index.html">Home</a>
+ <li><a href="../../doc/manual.html">Manual</a>
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
+ </ul>
+ <ul>
+ <li><a href="../index.html">Language modes</a>
+ <li><a class=active href="#">Lua</a>
+ </ul>
+</div>
+
+<article>
+<h2>Lua mode</h2>
+<form><textarea id="code" name="code">
+--[[
+example useless code to show lua syntax highlighting
+this is multiline comment
+]]
+
+function blahblahblah(x)
+
+ local table = {
+ "asd" = 123,
+ "x" = 0.34,
+ }
+ if x ~= 3 then
+ print( x )
+ elseif x == "string"
+ my_custom_function( 0x34 )
+ else
+ unknown_function( "some string" )
+ end
+
+ --single line comment
+
+end
+
+function blablabla3()
+
+ for k,v in ipairs( table ) do
+ --abcde..
+ y=[=[
+ x=[[
+ x is a multi line string
+ ]]
+ but its definition is iside a highest level string!
+ ]=]
+ print(" \"\" ")
+
+ s = math.sin( x )
+ end
+
+end
+</textarea></form>
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ tabMode: "indent",
+ matchBrackets: true,
+ theme: "neat"
+ });
+ </script>
+
+ <p>Loosely based on Franciszek
+ Wawrzak's <a href="http://codemirror.net/1/contrib/lua">CodeMirror
+ 1 mode</a>. One configuration parameter is
+ supported, <code>specials</code>, to which you can provide an
+ array of strings to have those identifiers highlighted with
+ the <code>lua-special</code> style.</p>
+ <p><strong>MIME types defined:</strong> <code>text/x-lua</code>.</p>
+
+ </article>
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/lua.js
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/lua.js?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/lua.js (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/lua/lua.js Fri Sep 20 02:29:16 2013
@@ -0,0 +1,144 @@
+// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's
+// CodeMirror 1 mode.
+// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting
+
+CodeMirror.defineMode("lua", function(config, parserConfig) {
+ var indentUnit = config.indentUnit;
+
+ function prefixRE(words) {
+ return new RegExp("^(?:" + words.join("|") + ")", "i");
+ }
+ function wordRE(words) {
+ return new RegExp("^(?:" + words.join("|") + ")$", "i");
+ }
+ var specials = wordRE(parserConfig.specials || []);
+
+ // long list of standard functions from lua manual
+ var builtins = wordRE([
+ "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load",
+ "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require",
+ "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",
+
+ "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",
+
+ "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable",
+ "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable",
+ "debug.setupvalue","debug.traceback",
+
+ "close","flush","lines","read","seek","setvbuf","write",
+
+ "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin",
+ "io.stdout","io.tmpfile","io.type","io.write",
+
+ "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg",
+ "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max",
+ "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh",
+ "math.sqrt","math.tan","math.tanh",
+
+ "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale",
+ "os.time","os.tmpname",
+
+ "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload",
+ "package.seeall",
+
+ "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub",
+ "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",
+
+ "table.concat","table.insert","table.maxn","table.remove","table.sort"
+ ]);
+ var keywords = wordRE(["and","break","elseif","false","nil","not","or","return",
+ "true","function", "end", "if", "then", "else", "do",
+ "while", "repeat", "until", "for", "in", "local" ]);
+
+ var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]);
+ var dedentTokens = wordRE(["end", "until", "\\)", "}"]);
+ var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]);
+
+ function readBracket(stream) {
+ var level = 0;
+ while (stream.eat("=")) ++level;
+ stream.eat("[");
+ return level;
+ }
+
+ function normal(stream, state) {
+ var ch = stream.next();
+ if (ch == "-" && stream.eat("-")) {
+ if (stream.eat("[") && stream.eat("["))
+ return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state);
+ stream.skipToEnd();
+ return "comment";
+ }
+ if (ch == "\"" || ch == "'")
+ return (state.cur = string(ch))(stream, state);
+ if (ch == "[" && /[\[=]/.test(stream.peek()))
+ return (state.cur = bracketed(readBracket(stream), "string"))(stream, state);
+ if (/\d/.test(ch)) {
+ stream.eatWhile(/[\w.%]/);
+ return "number";
+ }
+ if (/[\w_]/.test(ch)) {
+ stream.eatWhile(/[\w\\\-_.]/);
+ return "variable";
+ }
+ return null;
+ }
+
+ function bracketed(level, style) {
+ return function(stream, state) {
+ var curlev = null, ch;
+ while ((ch = stream.next()) != null) {
+ if (curlev == null) {if (ch == "]") curlev = 0;}
+ else if (ch == "=") ++curlev;
+ else if (ch == "]" && curlev == level) { state.cur = normal; break; }
+ else curlev = null;
+ }
+ return style;
+ };
+ }
+
+ function string(quote) {
+ return function(stream, state) {
+ var escaped = false, ch;
+ while ((ch = stream.next()) != null) {
+ if (ch == quote && !escaped) break;
+ escaped = !escaped && ch == "\\";
+ }
+ if (!escaped) state.cur = normal;
+ return "string";
+ };
+ }
+
+ return {
+ startState: function(basecol) {
+ return {basecol: basecol || 0, indentDepth: 0, cur: normal};
+ },
+
+ token: function(stream, state) {
+ if (stream.eatSpace()) return null;
+ var style = state.cur(stream, state);
+ var word = stream.current();
+ if (style == "variable") {
+ if (keywords.test(word)) style = "keyword";
+ else if (builtins.test(word)) style = "builtin";
+ else if (specials.test(word)) style = "variable-2";
+ }
+ if ((style != "comment") && (style != "string")){
+ if (indentTokens.test(word)) ++state.indentDepth;
+ else if (dedentTokens.test(word)) --state.indentDepth;
+ }
+ return style;
+ },
+
+ indent: function(state, textAfter) {
+ var closing = dedentPartial.test(textAfter);
+ return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));
+ },
+
+ lineComment: "--",
+ blockCommentStart: "--[[",
+ blockCommentEnd: "]]"
+ };
+});
+
+CodeMirror.defineMIME("text/x-lua", "lua");
Added: tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/markdown/index.html
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/markdown/index.html?rev=1524887&view=auto
==============================================================================
--- tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/markdown/index.html (added)
+++ tomee/tomee/trunk/tomee/tomee-webaccess/webaccess-gui-libs/codemirror/src/main/resources/META-INF/resources/app/lib/codemirror/mode/markdown/index.html Fri Sep 20 02:29:16 2013
@@ -0,0 +1,359 @@
+<!doctype html>
+
+<title>CodeMirror: Markdown mode</title>
+<meta charset="utf-8"/>
+<link rel=stylesheet href="../../doc/docs.css">
+
+<link rel="stylesheet" href="../../lib/codemirror.css">
+<script src="../../lib/codemirror.js"></script>
+<script src="../../addon/edit/continuelist.js"></script>
+<script src="../xml/xml.js"></script>
+<script src="markdown.js"></script>
+<style type="text/css">
+ .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
+ .cm-s-default .cm-trailing-space-a:before,
+ .cm-s-default .cm-trailing-space-b:before {position: absolute; content: "\00B7"; color: #777;}
+ .cm-s-default .cm-trailing-space-new-line:before {position: absolute; content: "\21B5"; color: #777;}
+ </style>
+<div id=nav>
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
+
+ <ul>
+ <li><a href="../../index.html">Home</a>
+ <li><a href="../../doc/manual.html">Manual</a>
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
+ </ul>
+ <ul>
+ <li><a href="../index.html">Language modes</a>
+ <li><a class=active href="#">Markdown</a>
+ </ul>
+</div>
+
+<article>
+<h2>Markdown mode</h2>
+<form><textarea id="code" name="code">
+Markdown: Basics
+================
+
+<ul id="ProjectSubmenu">
+ <li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
+ <li><a class="selected" title="Markdown Basics">Basics</a></li>
+ <li><a href="/projects/markdown/syntax" title="Markdown Syntax Documentation">Syntax</a></li>
+ <li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
+ <li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
+</ul>
+
+
+Getting the Gist of Markdown's Formatting Syntax
+------------------------------------------------
+
+This page offers a brief overview of what it's like to use Markdown.
+The [syntax page] [s] provides complete, detailed documentation for
+every feature, but Markdown should be very easy to pick up simply by
+looking at a few examples of it in action. The examples on this page
+are written in a before/after style, showing example syntax and the
+HTML output produced by Markdown.
+
+It's also helpful to simply try Markdown out; the [Dingus] [d] is a
+web application that allows you type your own Markdown-formatted text
+and translate it to XHTML.
+
+**Note:** This document is itself written using Markdown; you
+can [see the source for it by adding '.text' to the URL] [src].
+
+ [s]: /projects/markdown/syntax "Markdown Syntax"
+ [d]: /projects/markdown/dingus "Markdown Dingus"
+ [src]: /projects/markdown/basics.text
+
+
+## Paragraphs, Headers, Blockquotes ##
+
+A paragraph is simply one or more consecutive lines of text, separated
+by one or more blank lines. (A blank line is any line that looks like
+a blank line -- a line containing nothing but spaces or tabs is
+considered blank.) Normal paragraphs should not be indented with
+spaces or tabs.
+
+Markdown offers two styles of headers: *Setext* and *atx*.
+Setext-style headers for `<h1>` and `<h2>` are created by
+"underlining" with equal signs (`=`) and hyphens (`-`), respectively.
+To create an atx-style header, you put 1-6 hash marks (`#`) at the
+beginning of the line -- the number of hashes equals the resulting
+HTML header level.
+
+Blockquotes are indicated using email-style '`>`' angle brackets.
+
+Markdown:
+
+ A First Level Header
+ ====================
+
+ A Second Level Header
+ ---------------------
+
+ Now is the time for all good men to come to
+ the aid of their country. This is just a
+ regular paragraph.
+
+ The quick brown fox jumped over the lazy
+ dog's back.
+
+ ### Header 3
+
+ > This is a blockquote.
+ >
+ > This is the second paragraph in the blockquote.
+ >
+ > ## This is an H2 in a blockquote
+
+
+Output:
+
+ <h1>A First Level Header</h1>
+
+ <h2>A Second Level Header</h2>
+
+ <p>Now is the time for all good men to come to
+ the aid of their country. This is just a
+ regular paragraph.</p>
+
+ <p>The quick brown fox jumped over the lazy
+ dog's back.</p>
+
+ <h3>Header 3</h3>
+
+ <blockquote>
+ <p>This is a blockquote.</p>
+
+ <p>This is the second paragraph in the blockquote.</p>
+
+ <h2>This is an H2 in a blockquote</h2>
+ </blockquote>
+
+
+
+### Phrase Emphasis ###
+
+Markdown uses asterisks and underscores to indicate spans of emphasis.
+
+Markdown:
+
+ Some of these words *are emphasized*.
+ Some of these words _are emphasized also_.
+
+ Use two asterisks for **strong emphasis**.
+ Or, if you prefer, __use two underscores instead__.
+
+Output:
+
+ <p>Some of these words <em>are emphasized</em>.
+ Some of these words <em>are emphasized also</em>.</p>
+
+ <p>Use two asterisks for <strong>strong emphasis</strong>.
+ Or, if you prefer, <strong>use two underscores instead</strong>.</p>
+
+
+
+## Lists ##
+
+Unordered (bulleted) lists use asterisks, pluses, and hyphens (`*`,
+`+`, and `-`) as list markers. These three markers are
+interchangable; this:
+
+ * Candy.
+ * Gum.
+ * Booze.
+
+this:
+
+ + Candy.
+ + Gum.
+ + Booze.
+
+and this:
+
+ - Candy.
+ - Gum.
+ - Booze.
+
+all produce the same output:
+
+ <ul>
+ <li>Candy.</li>
+ <li>Gum.</li>
+ <li>Booze.</li>
+ </ul>
+
+Ordered (numbered) lists use regular numbers, followed by periods, as
+list markers:
+
+ 1. Red
+ 2. Green
+ 3. Blue
+
+Output:
+
+ <ol>
+ <li>Red</li>
+ <li>Green</li>
+ <li>Blue</li>
+ </ol>
+
+If you put blank lines between items, you'll get `<p>` tags for the
+list item text. You can create multi-paragraph list items by indenting
+the paragraphs by 4 spaces or 1 tab:
+
+ * A list item.
+
+ With multiple paragraphs.
+
+ * Another item in the list.
+
+Output:
+
+ <ul>
+ <li><p>A list item.</p>
+ <p>With multiple paragraphs.</p></li>
+ <li><p>Another item in the list.</p></li>
+ </ul>
+
+
+
+### Links ###
+
+Markdown supports two styles for creating links: *inline* and
+*reference*. With both styles, you use square brackets to delimit the
+text you want to turn into a link.
+
+Inline-style links use parentheses immediately after the link text.
+For example:
+
+ This is an [example link](http://example.com/).
+
+Output:
+
+ <p>This is an <a href="http://example.com/">
+ example link</a>.</p>
+
+Optionally, you may include a title attribute in the parentheses:
+
+ This is an [example link](http://example.com/ "With a Title").
+
+Output:
+
+ <p>This is an <a href="http://example.com/" title="With a Title">
+ example link</a>.</p>
+
+Reference-style links allow you to refer to your links by names, which
+you define elsewhere in your document:
+
+ I get 10 times more traffic from [Google][1] than from
+ [Yahoo][2] or [MSN][3].
+
+ [1]: http://google.com/ "Google"
+ [2]: http://search.yahoo.com/ "Yahoo Search"
+ [3]: http://search.msn.com/ "MSN Search"
+
+Output:
+
+ <p>I get 10 times more traffic from <a href="http://google.com/"
+ title="Google">Google</a> than from <a href="http://search.yahoo.com/"
+ title="Yahoo Search">Yahoo</a> or <a href="http://search.msn.com/"
+ title="MSN Search">MSN</a>.</p>
+
+The title attribute is optional. Link names may contain letters,
+numbers and spaces, but are *not* case sensitive:
+
+ I start my morning with a cup of coffee and
+ [The New York Times][NY Times].
+
+ [ny times]: http://www.nytimes.com/
+
+Output:
+
+ <p>I start my morning with a cup of coffee and
+ <a href="http://www.nytimes.com/">The New York Times</a>.</p>
+
+
+### Images ###
+
+Image syntax is very much like link syntax.
+
+Inline (titles are optional):
+
+ ![alt text](/path/to/img.jpg "Title")
+
+Reference-style:
+
+ ![alt text][id]
+
+ [id]: /path/to/img.jpg "Title"
+
+Both of the above examples produce the same output:
+
+ <img src="/path/to/img.jpg" alt="alt text" title="Title" />
+
+
+
+### Code ###
+
+In a regular paragraph, you can create code span by wrapping text in
+backtick quotes. Any ampersands (`&`) and angle brackets (`<` or
+`>`) will automatically be translated into HTML entities. This makes
+it easy to use Markdown to write about HTML example code:
+
+ I strongly recommend against using any `<blink>` tags.
+
+ I wish SmartyPants used named entities like `&mdash;`
+ instead of decimal-encoded entites like `&#8212;`.
+
+Output:
+
+ <p>I strongly recommend against using any
+ <code>&lt;blink&gt;</code> tags.</p>
+
+ <p>I wish SmartyPants used named entities like
+ <code>&amp;mdash;</code> instead of decimal-encoded
+ entites like <code>&amp;#8212;</code>.</p>
+
+
+To specify an entire block of pre-formatted code, indent every line of
+the block by 4 spaces or 1 tab. Just like with code spans, `&`, `<`,
+and `>` characters will be escaped automatically.
+
+Markdown:
+
+ If you want your page to validate under XHTML 1.0 Strict,
+ you've got to put paragraph tags in your blockquotes:
+
+ <blockquote>
+ <p>For example.</p>
+ </blockquote>
+
+Output:
+
+ <p>If you want your page to validate under XHTML 1.0 Strict,
+ you've got to put paragraph tags in your blockquotes:</p>
+
+ <pre><code>&lt;blockquote&gt;
+ &lt;p&gt;For example.&lt;/p&gt;
+ &lt;/blockquote&gt;
+ </code></pre>
+</textarea></form>
+
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ mode: 'markdown',
+ lineNumbers: true,
+ theme: "default",
+ extraKeys: {"Enter": "newlineAndIndentContinueMarkdownList"}
+ });
+ </script>
+
+ <p>Optionally depends on the XML mode for properly highlighted inline XML blocks.</p>
+
+ <p><strong>MIME types defined:</strong> <code>text/x-markdown</code>.</p>
+
+ <p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#markdown_*">normal</a>, <a href="../../test/index.html#verbose,markdown_*">verbose</a>.</p>
+
+ </article>