diff --git a/rhodecode/public/js/mode/apl/index.html b/rhodecode/public/js/mode/apl/index.html --- a/rhodecode/public/js/mode/apl/index.html +++ b/rhodecode/public/js/mode/apl/index.html @@ -3,13 +3,13 @@ <head> <meta charset="utf-8"> <title>CodeMirror: APL mode</title> - <link rel="stylesheet" href="../../doc/docs.css"> - <link rel="stylesheet" href="../../lib/codemirror.css"> + <link rel="stylesheet" href="../../doc/docs.css"> + <link rel="stylesheet" href="../../lib/codemirror.css"> <script src="../../lib/codemirror.js"></script> <script src="../../addon/edit/matchbrackets.js"></script> <script src="apl.js"></script> <style> - .CodeMirror { border: 2px inset #dee; } + .CodeMirror { border: 2px inset #dee; } </style> </head> <body> diff --git a/rhodecode/public/js/mode/asterisk/index.html b/rhodecode/public/js/mode/asterisk/index.html --- a/rhodecode/public/js/mode/asterisk/index.html +++ b/rhodecode/public/js/mode/asterisk/index.html @@ -52,66 +52,66 @@ include => stdexten ; ; We start with what to do when a call first comes in. ; -exten => s,1,Wait(1) ; Wait a second, just for fun -same => n,Answer ; Answer the line -same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds -same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds -same => n(restart),BackGround(demo-congrats) ; Play a congratulatory message -same => n(instruct),BackGround(demo-instruct) ; Play some instructions -same => n,WaitExten ; Wait for an extension to be dialed. +exten => s,1,Wait(1) ; Wait a second, just for fun +same => n,Answer ; Answer the line +same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds +same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds +same => n(restart),BackGround(demo-congrats) ; Play a congratulatory message +same => n(instruct),BackGround(demo-instruct) ; Play some instructions +same => n,WaitExten ; Wait for an extension to be dialed. -exten => 2,1,BackGround(demo-moreinfo) ; Give some more information. +exten => 2,1,BackGround(demo-moreinfo) ; Give some more information. exten => 2,n,Goto(s,instruct) -exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french -exten => 3,n,Goto(s,restart) ; Start with the congratulations +exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french +exten => 3,n,Goto(s,restart) ; Start with the congratulations exten => 1000,1,Goto(default,s,1) ; ; We also create an example user, 1234, who is on the console and has ; voicemail, etc. ; -exten => 1234,1,Playback(transfer,skip) ; "Please hold while..." - ; (but skip if channel is not up) +exten => 1234,1,Playback(transfer,skip) ; "Please hold while..." + ; (but skip if channel is not up) exten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)})) -exten => 1234,n,Goto(default,s,1) ; exited Voicemail +exten => 1234,n,Goto(default,s,1) ; exited Voicemail -exten => 1235,1,Voicemail(1234,u) ; Right to voicemail +exten => 1235,1,Voicemail(1234,u) ; Right to voicemail -exten => 1236,1,Dial(Console/dsp) ; Ring forever -exten => 1236,n,Voicemail(1234,b) ; Unless busy +exten => 1236,1,Dial(Console/dsp) ; Ring forever +exten => 1236,n,Voicemail(1234,b) ; Unless busy ; ; # for when they're done with the demo ; -exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo" -exten => #,n,Hangup ; Hang them up. +exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo" +exten => #,n,Hangup ; Hang them up. ; ; A timeout and "invalid extension rule" ; -exten => t,1,Goto(#,1) ; If they take too long, give up -exten => i,1,Playback(invalid) ; "That's not valid, try again" +exten => t,1,Goto(#,1) ; If they take too long, give up +exten => i,1,Playback(invalid) ; "That's not valid, try again" ; ; Create an extension, 500, for dialing the ; Asterisk demo. ; exten => 500,1,Playback(demo-abouttotry); Let them know what's going on -exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo -exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site -exten => 500,n,Goto(s,6) ; Return to the start over message. +exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo +exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site +exten => 500,n,Goto(s,6) ; Return to the start over message. ; ; Create an extension, 600, for evaluating echo latency. ; -exten => 600,1,Playback(demo-echotest) ; Let them know what's going on -exten => 600,n,Echo ; Do the echo test -exten => 600,n,Playback(demo-echodone) ; Let them know it's over -exten => 600,n,Goto(s,6) ; Start over +exten => 600,1,Playback(demo-echotest) ; Let them know what's going on +exten => 600,n,Echo ; Do the echo test +exten => 600,n,Playback(demo-echodone) ; Let them know it's over +exten => 600,n,Goto(s,6) ; Start over ; -; You can use the Macro Page to intercom a individual user +; You can use the Macro Page to intercom a individual user exten => 76245,1,Macro(page,SIP/Grandstream1) ; or if your peernames are the same as extensions exten => _7XXX,1,Macro(page,SIP/${EXTEN}) diff --git a/rhodecode/public/js/mode/clike/scala.html b/rhodecode/public/js/mode/clike/scala.html --- a/rhodecode/public/js/mode/clike/scala.html +++ b/rhodecode/public/js/mode/clike/scala.html @@ -19,7 +19,7 @@ } html, form, .CodeMirror, .CodeMirror-scroll { - height: 100%; + height: 100%; } </style> </head> @@ -44,7 +44,7 @@ import parallel.ParIterable /** A template trait for traversable collections of type `Traversable[A]`. - * + * * $traversableInfo * @define mutability * @define traversableInfo @@ -54,15 +54,15 @@ * {{{ * def foreach[U](f: Elem => U): Unit * }}} - * Collection classes mixing in this trait provide a concrete + * Collection classes mixing in this trait provide a concrete * `foreach` method which traverses all the * elements contained in the collection, applying a given function to each. * They also need to provide a method `newBuilder` * which creates a builder for collections of the same kind. - * + * * A traversable class might or might not have two properties: strictness * and orderedness. Neither is represented as a type. - * + * * The instances of a strict collection class have all their elements * computed before they can be used as values. By contrast, instances of * a non-strict collection class may defer computation of some of their @@ -71,13 +71,13 @@ * <a href="../immutable/Stream.html" target="ContentFrame"> * `scala.collection.immutable.Stream`</a>. * A more general class of examples are `TraversableViews`. - * + * * If a collection is an instance of an ordered collection class, traversing * its elements with `foreach` will always visit elements in the * same order, even for different runs of the program. If the class is not * ordered, `foreach` can visit elements in different orders for * different runs (but it will keep the same order in the same run).' - * + * * A typical example of a collection class which is not ordered is a * `HashMap` of objects. The traversal order for hash maps will * depend on the hash codes of its elements, and these hash codes might @@ -94,7 +94,7 @@ * @define Coll Traversable * @define coll traversable collection */ - trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr] + trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr] with FilterMonadic[A, Repr] with TraversableOnce[A] with GenTraversableLike[A, Repr] @@ -131,15 +131,15 @@ protected[this] def parCombiner = ParIterable.newCombiner[A] /** Applies a function `f` to all elements of this $coll. - * + * * Note: this method underlies the implementation of most other bulk operations. * It's important to implement this method in an efficient way. - * + * * * @param f the function that is applied for its side-effect to every element. * The result of function `f` is discarded. - * - * @tparam U the type parameter describing the result of function `f`. + * + * @tparam U the type parameter describing the result of function `f`. * This result will always be ignored. Typically `U` is `Unit`, * but this is not necessary. * @@ -167,7 +167,7 @@ * such as `Stream`, the predicate returns `true` if all elements have been computed. * It returns `false` if the stream is not yet evaluated to the end. * - * Note: many collection methods will not work on collections of infinite sizes. + * Note: many collection methods will not work on collections of infinite sizes. * * @return `true` if this collection is known to have finite size, `false` otherwise. */ @@ -188,16 +188,16 @@ /** Concatenates this $coll with the elements of a traversable collection. * It differs from ++ in that the right operand determines the type of the * resulting collection rather than the left one. - * + * * @param that the traversable to append. - * @tparam B the element type of the returned collection. + * @tparam B the element type of the returned collection. * @tparam That $thatinfo * @param bf $bfinfo * @return a new collection of type `That` which contains all elements * of this $coll followed by all elements of `that`. - * + * * @usecase def ++:[B](that: TraversableOnce[B]): $Coll[B] - * + * * @return a new $coll which contains all elements of this $coll * followed by all elements of `that`. */ @@ -219,7 +219,7 @@ def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = { val b = bf(repr) - b.sizeHint(this) + b.sizeHint(this) for (x <- this) b += f(x) b.result } @@ -238,7 +238,7 @@ */ def filter(p: A => Boolean): Repr = { val b = newBuilder - for (x <- this) + for (x <- this) if (p(x)) b += x b.result } @@ -269,14 +269,14 @@ * The order of the elements is preserved. * * @usecase def filterMap[B](f: A => Option[B]): $Coll[B] - * + * * @param pf the partial function which filters and maps the $coll. * @return a new $coll resulting from applying the given option-valued function * `f` to each element and collecting all defined results. * The order of the elements is preserved. def filterMap[B, That](f: A => Option[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = { val b = bf(repr) - for (x <- this) + for (x <- this) f(x) match { case Some(y) => b += y case _ => @@ -288,7 +288,7 @@ /** Partitions this $coll in two ${coll}s according to a predicate. * * @param p the predicate on which to partition. - * @return a pair of ${coll}s: the first $coll consists of all elements that + * @return a pair of ${coll}s: the first $coll consists of all elements that * satisfy the predicate `p` and the second $coll consists of all elements * that don't. The relative order of the elements in the resulting ${coll}s * is the same as in the original $coll. @@ -348,7 +348,7 @@ } /** Finds the first element of the $coll satisfying a predicate, if any. - * + * * $mayNotTerminateInf * $orderDependent * @@ -419,7 +419,7 @@ * @return a $coll consisting of all elements of this $coll * except the first one. * @throws `UnsupportedOperationException` if the $coll is empty. - */ + */ override def tail: Repr = { if (isEmpty) throw new UnsupportedOperationException("empty.tail") drop(1) @@ -465,7 +465,7 @@ def take(n: Int): Repr = slice(0, n) - def drop(n: Int): Repr = + def drop(n: Int): Repr = if (n <= 0) { val b = newBuilder b.sizeHint(this) @@ -501,7 +501,7 @@ val b = newBuilder if (until <= from) b.result else { - b.sizeHintBounded(until - from, this) + b.sizeHintBounded(until - from, this) sliceInternal(from, until, b) } } @@ -555,7 +555,7 @@ * * @return an iterator over all the tails of this $coll * @example `List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)` - */ + */ def tails: Iterator[Repr] = iterateUntilEmpty(_.tail) /** Iterates over the inits of this $coll. The first value will be this @@ -574,12 +574,12 @@ * or the end of the array is reached, or `len` elements have been copied. * * $willNotTerminateInf - * + * * @param xs the array to fill. * @param start the starting index. * @param len the maximal number of elements to copy. - * @tparam B the type of the elements of the array. - * + * @tparam B the type of the elements of the array. + * * * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit */ @@ -623,7 +623,7 @@ } /** Creates a non-strict view of this $coll. - * + * * @return a non-strict view of this $coll. */ def view = new TraversableView[A, Repr] { @@ -635,10 +635,10 @@ * * Note: the difference between `view` and `slice` is that `view` produces * a view of the current $coll, whereas `slice` produces a new $coll. - * + * * Note: `view(from, to)` is equivalent to `view.slice(from, to)` * $orderDependent - * + * * @param from the index of the first element of the view * @param until the index of the element following the view * @return a non-strict view of a slice of this $coll, starting at index `from` @@ -653,7 +653,7 @@ * restricts the domain of subsequent `map`, `flatMap`, `foreach`, * and `withFilter` operations. * $orderDependent - * + * * @param p the predicate used to test elements. * @return an object of class `WithFilter`, which supports * `map`, `flatMap`, `foreach`, and `withFilter` operations. @@ -678,22 +678,22 @@ * the given function `f` to each element of the outer $coll * that satisfies predicate `p` and collecting the results. * - * @usecase def map[B](f: A => B): $Coll[B] - * + * @usecase def map[B](f: A => B): $Coll[B] + * * @return a new $coll resulting from applying the given function * `f` to each element of the outer $coll that satisfies * predicate `p` and collecting the results. */ def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = { val b = bf(repr) - for (x <- self) + for (x <- self) if (p(x)) b += f(x) b.result } /** Builds a new collection by applying a function to all elements of the * outer $coll containing this `WithFilter` instance that satisfy - * predicate `p` and concatenating the results. + * predicate `p` and concatenating the results. * * @param f the function to apply to each element. * @tparam B the element type of the returned collection. @@ -705,13 +705,13 @@ * concatenating the results. * * @usecase def flatMap[B](f: A => TraversableOnce[B]): $Coll[B] - * + * * @return a new $coll resulting from applying the given collection-valued function * `f` to each element of the outer $coll that satisfies predicate `p` and concatenating the results. */ def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = { val b = bf(repr) - for (x <- self) + for (x <- self) if (p(x)) b ++= f(x).seq b.result } @@ -721,15 +721,15 @@ * * @param f the function that is applied for its side-effect to every element. * The result of function `f` is discarded. - * - * @tparam U the type parameter describing the result of function `f`. + * + * @tparam U the type parameter describing the result of function `f`. * This result will always be ignored. Typically `U` is `Unit`, * but this is not necessary. * * @usecase def foreach(f: A => Unit): Unit - */ - def foreach[U](f: A => U): Unit = - for (x <- self) + */ + def foreach[U](f: A => U): Unit = + for (x <- self) if (p(x)) f(x) /** Further refines the filter for this $coll. @@ -740,7 +740,7 @@ * All these operations apply to those elements of this $coll which * satisfy the predicate `q` in addition to the predicate `p`. */ - def withFilter(q: A => Boolean): WithFilter = + def withFilter(q: A => Boolean): WithFilter = new WithFilter(x => p(x) && q(x)) } diff --git a/rhodecode/public/js/mode/cobol/index.html b/rhodecode/public/js/mode/cobol/index.html --- a/rhodecode/public/js/mode/cobol/index.html +++ b/rhodecode/public/js/mode/cobol/index.html @@ -83,7 +83,7 @@ 12345678911234567892123456789312345678941234567895123456789612345678971234567898 000010 IDENTIFICATION DIVISION. MODTGHERE 000020 PROGRAM-ID. SAMPLE. -000030 AUTHOR. TEST SAM. +000030 AUTHOR. TEST SAM. 000040 DATE-WRITTEN. 5 February 2013 000041 000042* A sample program just to show the form. @@ -119,12 +119,12 @@ 000280 01 DETAIL-LINE. 000290 05 FILLER PIC X(7) VALUE SPACES. 000300 05 RECORD-IMAGE PIC X(43). 000310 05 FILLER PIC X(30) VALUE SPACES. -000311 +000311 000312 01 SUMMARY-LINE. 000313 05 FILLER PIC X(7) VALUE SPACES. 000314 05 TOTAL-READ PIC 99. 000315 05 FILLER PIC X VALUE SPACE. -000316 05 FILLER PIC X(17) +000316 05 FILLER PIC X(17) 000317 VALUE 'Records were read'. 000318 05 FILLER PIC X(53) VALUE SPACES. 000319 @@ -151,12 +151,12 @@ 000490 WRITE PRINT-LINE. 000500 ADD 1 TO RECORDS-WRITTEN. 000510 READ STUDENT-FILE 000520 AT END MOVE 'NO' TO DATA-REMAINS-SWITCH -000530 END-READ. +000530 END-READ. 000540 000550 PRINT-SUMMARY. 000560 MOVE RECORDS-WRITTEN TO TOTAL-READ. 000570 MOVE SUMMARY-LINE TO PRINT-LINE. -000571 WRITE PRINT-LINE. +000571 WRITE PRINT-LINE. 000572 000580 </textarea> @@ -167,7 +167,7 @@ 000580 mode: "text/x-cobol", theme : "twilight", styleActiveLine: true, - showCursorWhenSelecting : true, + showCursorWhenSelecting : true, }); function selectTheme() { var themeInput = document.getElementById("selectTheme"); diff --git a/rhodecode/public/js/mode/coffeescript/index.html b/rhodecode/public/js/mode/coffeescript/index.html --- a/rhodecode/public/js/mode/coffeescript/index.html +++ b/rhodecode/public/js/mode/coffeescript/index.html @@ -16,10 +16,10 @@ # Copyright (c) 2011 Jeff Pickhardt, released under # the MIT License. # -# Modified from the Python CodeMirror mode, which also is +# Modified from the Python CodeMirror mode, which also is # under the MIT License Copyright (c) 2010 Timothy Farrell. # -# The following script, Underscore.coffee, is used to +# The following script, Underscore.coffee, is used to # demonstrate CoffeeScript mode for CodeMirror. # # To download CoffeeScript mode for CodeMirror, go to: diff --git a/rhodecode/public/js/mode/diff/index.html b/rhodecode/public/js/mode/diff/index.html --- a/rhodecode/public/js/mode/diff/index.html +++ b/rhodecode/public/js/mode/diff/index.html @@ -38,21 +38,21 @@ index 04646a9..9a39cc7 100644 +++ b/lib/codemirror.js @@ -399,10 +399,16 @@ var CodeMirror = (function() { } - + function onMouseDown(e) { -- var start = posFromMouse(e), last = start; +- var start = posFromMouse(e), last = start; + var start = posFromMouse(e), last = start, target = e.target(); if (!start) return; setCursor(start.line, start.ch, false); if (e.button() != 1) return; -+ if (target.parentNode == gutter) { ++ if (target.parentNode == gutter) { + if (options.onGutterClick) + options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom); + return; + } + if (!focused) onFocus(); - + e.stop(); @@ -808,7 +814,7 @@ var CodeMirror = (function() { for (var i = showingFrom; i < showingTo; ++i) { @@ -78,7 +78,7 @@ index 04646a9..9a39cc7 100644 undo: operation(undo), @@ -1402,7 +1406,8 @@ var CodeMirror = (function() { replaceRange: operation(replaceRange), - + operation: function(f){return operation(f)();}, - refresh: function(){updateDisplay([{from: 0, to: lines.length}]);} + refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}, diff --git a/rhodecode/public/js/mode/ecl/index.html b/rhodecode/public/js/mode/ecl/index.html --- a/rhodecode/public/js/mode/ecl/index.html +++ b/rhodecode/public/js/mode/ecl/index.html @@ -19,7 +19,7 @@ this is a multiline comment! // this is a singleline comment! import ut; -r := +r := record string22 s1 := '123'; integer4 i1 := 123; diff --git a/rhodecode/public/js/mode/erlang/index.html b/rhodecode/public/js/mode/erlang/index.html --- a/rhodecode/public/js/mode/erlang/index.html +++ b/rhodecode/public/js/mode/erlang/index.html @@ -32,7 +32,7 @@ rec_info(demo) -> record_info(fields,demo). demo() -> expand_recs(?MODULE,#demo{a="A",b="BB"}). - + expand_recs(M,List) when is_list(List) -> [expand_recs(M,L)||L<-List]; expand_recs(M,Tup) when is_tuple(Tup) -> diff --git a/rhodecode/public/js/mode/gas/index.html b/rhodecode/public/js/mode/gas/index.html --- a/rhodecode/public/js/mode/gas/index.html +++ b/rhodecode/public/js/mode/gas/index.html @@ -17,7 +17,7 @@ .syntax unified .global main -/* +/* * A * multi-line * comment. diff --git a/rhodecode/public/js/mode/gfm/index.html b/rhodecode/public/js/mode/gfm/index.html --- a/rhodecode/public/js/mode/gfm/index.html +++ b/rhodecode/public/js/mode/gfm/index.html @@ -9,13 +9,13 @@ <script src="../xml/xml.js"></script> <script src="../markdown/markdown.js"></script> <script src="gfm.js"></script> - + <!-- Code block highlighting modes --> <script src="../javascript/javascript.js"></script> <script src="../css/css.js"></script> <script src="../htmlmixed/htmlmixed.js"></script> <script src="../clike/clike.js"></script> - + <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> <link rel="stylesheet" href="../../doc/docs.css"> </head> diff --git a/rhodecode/public/js/mode/go/index.html b/rhodecode/public/js/mode/go/index.html --- a/rhodecode/public/js/mode/go/index.html +++ b/rhodecode/public/js/mode/go/index.html @@ -25,36 +25,36 @@ import "fmt" // Send the sequence 2, 3, 4, ... to channel 'ch'. func generate(ch chan<- int) { - for i := 2; ; i++ { - ch <- i // Send 'i' to channel 'ch' - } + for i := 2; ; i++ { + ch <- i // Send 'i' to channel 'ch' + } } // Copy the values from channel 'src' to channel 'dst', // removing those divisible by 'prime'. func filter(src <-chan int, dst chan<- int, prime int) { - for i := range src { // Loop over values received from 'src'. - if i%prime != 0 { - dst <- i // Send 'i' to channel 'dst'. - } - } + for i := range src { // Loop over values received from 'src'. + if i%prime != 0 { + dst <- i // Send 'i' to channel 'dst'. + } + } } // The prime sieve: Daisy-chain filter processes together. func sieve() { - ch := make(chan int) // Create a new channel. - go generate(ch) // Start generate() as a subprocess. - for { - prime := <-ch - fmt.Print(prime, "\n") - ch1 := make(chan int) - go filter(ch, ch1, prime) - ch = ch1 - } + ch := make(chan int) // Create a new channel. + go generate(ch) // Start generate() as a subprocess. + for { + prime := <-ch + fmt.Print(prime, "\n") + ch1 := make(chan int) + go filter(ch, ch1, prime) + ch = ch1 + } } func main() { - sieve() + sieve() } </textarea></form> diff --git a/rhodecode/public/js/mode/haskell/index.html b/rhodecode/public/js/mode/haskell/index.html --- a/rhodecode/public/js/mode/haskell/index.html +++ b/rhodecode/public/js/mode/haskell/index.html @@ -44,7 +44,7 @@ permBag bs = concatMap (\(f,cs) -> map ( oneOfEach (an@(a,n):bs) = let bs' = if n == 1 then bs else (a,n-1):bs in (a,bs') : mapSnd (an:) (oneOfEach bs) - + apSnd f (a,b) = (a, f b) mapSnd = map . apSnd </textarea></form> diff --git a/rhodecode/public/js/mode/haxe/index.html b/rhodecode/public/js/mode/haxe/index.html --- a/rhodecode/public/js/mode/haxe/index.html +++ b/rhodecode/public/js/mode/haxe/index.html @@ -18,62 +18,62 @@ import one.two.Three; @attr("test") class Foo<T> extends Three { - public function new() - { - noFoo = 12; - } - - public static inline function doFoo(obj:{k:Int, l:Float}):Int - { - for(i in 0...10) - { - obj.k++; - trace(i); - var var1 = new Array(); - if(var1.length > 1) - throw "Error"; - } - // The following line should not be colored, the variable is scoped out - var1; - /* Multi line - * Comment test - */ - return obj.k; - } - private function bar():Void - { - #if flash - var t1:String = "1.21"; - #end - try { - doFoo({k:3, l:1.2}); - } - catch (e : String) { - trace(e); - } - var t2:Float = cast(3.2); - var t3:haxe.Timer = new haxe.Timer(); - var t4 = {k:Std.int(t2), l:Std.parseFloat(t1)}; - var t5 = ~/123+.*$/i; - doFoo(t4); - untyped t1 = 4; - bob = new Foo<Int> - } - public var okFoo(default, never):Float; - var noFoo(getFoo, null):Int; - function getFoo():Int { - return noFoo; - } - - public var three:Int; + public function new() + { + noFoo = 12; + } + + public static inline function doFoo(obj:{k:Int, l:Float}):Int + { + for(i in 0...10) + { + obj.k++; + trace(i); + var var1 = new Array(); + if(var1.length > 1) + throw "Error"; + } + // The following line should not be colored, the variable is scoped out + var1; + /* Multi line + * Comment test + */ + return obj.k; + } + private function bar():Void + { + #if flash + var t1:String = "1.21"; + #end + try { + doFoo({k:3, l:1.2}); + } + catch (e : String) { + trace(e); + } + var t2:Float = cast(3.2); + var t3:haxe.Timer = new haxe.Timer(); + var t4 = {k:Std.int(t2), l:Std.parseFloat(t1)}; + var t5 = ~/123+.*$/i; + doFoo(t4); + untyped t1 = 4; + bob = new Foo<Int> + } + public var okFoo(default, never):Float; + var noFoo(getFoo, null):Int; + function getFoo():Int { + return noFoo; + } + + public var three:Int; } enum Color { - red; - green; - blue; - grey( v : Int ); - rgb (r:Int,g:Int,b:Int); + red; + green; + blue; + grey( v : Int ); + rgb (r:Int,g:Int,b:Int); } </textarea></div> diff --git a/rhodecode/public/js/mode/htmlembedded/index.html b/rhodecode/public/js/mode/htmlembedded/index.html --- a/rhodecode/public/js/mode/htmlembedded/index.html +++ b/rhodecode/public/js/mode/htmlembedded/index.html @@ -19,13 +19,13 @@ <form><textarea id="code" name="code"> <% function hello(who) { - return "Hello " + who; + return "Hello " + who; } %> This is an example of EJS (embedded javascript) <p>The program says <%= hello("world") %>.</p> <script> - alert("And here is some normal JS code"); // also colored + alert("And here is some normal JS code"); // also colored </script> </textarea></form> @@ -43,7 +43,7 @@ This is an example of EJS (embedded java <p>Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on JavaScript, CSS and XML.<br />Other dependancies include those of the scriping language chosen.</p> - <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), + <p><strong>MIME types defined:</strong> <code>application/x-aspx</code> (ASP.NET), <code>application/x-ejs</code> (Embedded Javascript), <code>application/x-jsp</code> (JavaServer Pages)</p> </body> </html> diff --git a/rhodecode/public/js/mode/http/index.html b/rhodecode/public/js/mode/http/index.html --- a/rhodecode/public/js/mode/http/index.html +++ b/rhodecode/public/js/mode/http/index.html @@ -17,7 +17,7 @@ POST /somewhere HTTP/1.1 Host: example.com If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT Content-Type: application/x-www-form-urlencoded; - charset=utf-8 + charset=utf-8 User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11 This is the request body! diff --git a/rhodecode/public/js/mode/javascript/typescript.html b/rhodecode/public/js/mode/javascript/typescript.html --- a/rhodecode/public/js/mode/javascript/typescript.html +++ b/rhodecode/public/js/mode/javascript/typescript.html @@ -14,21 +14,21 @@ <div><textarea id="code" name="code"> class Greeter { - greeting: string; - constructor (message: string) { - this.greeting = message; - } - greet() { - return "Hello, " + this.greeting; - } -} + greeting: string; + constructor (message: string) { + this.greeting = message; + } + greet() { + return "Hello, " + this.greeting; + } +} var greeter = new Greeter("world"); var button = document.createElement('button') button.innerText = "Say Hello" button.onclick = function() { - alert(greeter.greet()) + alert(greeter.greet()) } document.body.appendChild(button) diff --git a/rhodecode/public/js/mode/less/index.html b/rhodecode/public/js/mode/less/index.html --- a/rhodecode/public/js/mode/less/index.html +++ b/rhodecode/public/js/mode/less/index.html @@ -127,12 +127,12 @@ input::-moz-focus-inner { // Inner paddi } fieldset span button, fieldset span input[type="file"] { font-size:12px; - font-family:Arial, Helvetica, sans-serif; + 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; + -moz-border-radius-bottomleft:3px; + -webkit-border-bottom-left-radius:3px; + border-bottom-left-radius:3px; } /* Some LESS code */ @@ -347,7 +347,7 @@ nav a, #dropdown li { border: 2px solid transparent; border-width: 0 2px; &:hover { - .dark-red; + .dark-red; text-decoration: none; } } @@ -400,7 +400,7 @@ nav a, #dropdown li { border-top-width: 0; background-color: darken(@medium, 10%); ul { - padding: 0px; + padding: 0px; } li { font-size: 14px; @@ -410,9 +410,9 @@ nav a, #dropdown li { border: 0; a { display: block; - padding: 0px 15px; + padding: 0px 15px; text-decoration: none; - color: white; + color: white; &:hover { background-color: darken(@medium, 15%); text-decoration: none; @@ -450,13 +450,13 @@ nav a, #dropdown li { #download img { display: inline-block} #download-info { code { - font-size: 13px; + font-size: 13px; } color: @blue + #333; display: inline; float: left; margin: 36px 0 0 15px } } h2 { span { - color: @medium; + color: @medium; } color: @blue; margin: 20px 0; @@ -526,7 +526,7 @@ nav a, #dropdown li { line-height: 26px; padding: 0 60px; code { - font-size: 16px; + font-size: 16px; } pre { border-width: 1px; @@ -599,18 +599,18 @@ nav a, #dropdown li { } td { - padding-right: 30px; + padding-right: 30px; } #synopsis { .box-shadow(0, 5px, 5px, 0.2); } #synopsis, #about { h2 { - font-size: 30px; + font-size: 30px; padding: 10px 0; } h1 + h2 { - margin-top: 15px; + margin-top: 15px; } h3 { font-size: 22px } @@ -631,7 +631,7 @@ td { } .css-output { td { - border-left: 0; + border-left: 0; } } .less-example { diff --git a/rhodecode/public/js/mode/lua/index.html b/rhodecode/public/js/mode/lua/index.html --- a/rhodecode/public/js/mode/lua/index.html +++ b/rhodecode/public/js/mode/lua/index.html @@ -23,7 +23,7 @@ function blahblahblah(x) local table = { "asd" = 123, - "x" = 0.34, + "x" = 0.34, } if x ~= 3 then print( x ) @@ -34,7 +34,7 @@ function blahblahblah(x) end --single line comment - + end function blablabla3() diff --git a/rhodecode/public/js/mode/markdown/index.html b/rhodecode/public/js/mode/markdown/index.html --- a/rhodecode/public/js/mode/markdown/index.html +++ b/rhodecode/public/js/mode/markdown/index.html @@ -71,7 +71,7 @@ Markdown: A First Level Header ==================== - + A Second Level Header --------------------- @@ -81,11 +81,11 @@ Markdown: 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 @@ -94,23 +94,23 @@ Markdown: 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> @@ -124,7 +124,7 @@ 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__. @@ -132,10 +132,10 @@ 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 ## @@ -188,7 +188,7 @@ list item text. You can create multi-par the paragraphs by 4 spaces or 1 tab: * A list item. - + With multiple paragraphs. * Another item in the list. @@ -200,7 +200,7 @@ Output: <p>With multiple paragraphs.</p></li> <li><p>Another item in the list.</p></li> </ul> - + ### Links ### @@ -295,7 +295,7 @@ 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> @@ -318,7 +318,7 @@ 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; diff --git a/rhodecode/public/js/mode/mirc/index.html b/rhodecode/public/js/mode/mirc/index.html --- a/rhodecode/public/js/mode/mirc/index.html +++ b/rhodecode/public/js/mode/mirc/index.html @@ -135,9 +135,9 @@ Raw 315:*: { <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { tabMode: "indent", - theme: "twilight", + theme: "twilight", lineNumbers: true, - matchBrackets: true, + matchBrackets: true, indentUnit: 4, mode: "text/mirc" }); diff --git a/rhodecode/public/js/mode/ntriples/index.html b/rhodecode/public/js/mode/ntriples/index.html --- a/rhodecode/public/js/mode/ntriples/index.html +++ b/rhodecode/public/js/mode/ntriples/index.html @@ -11,12 +11,12 @@ .CodeMirror { border: 1px solid #eee; } - </style> + </style> </head> <body> <h1>CodeMirror: NTriples mode</h1> <form> -<textarea id="ntriples" name="ntriples"> +<textarea id="ntriples" name="ntriples"> <http://Sub1> <http://pred1> <http://obj> . <http://Sub2> <http://pred2#an2> "literal 1" . <http://Sub3#an3> <http://pred3> _:bnode3 . diff --git a/rhodecode/public/js/mode/ocaml/index.html b/rhodecode/public/js/mode/ocaml/index.html --- a/rhodecode/public/js/mode/ocaml/index.html +++ b/rhodecode/public/js/mode/ocaml/index.html @@ -75,7 +75,7 @@ let rec sort = function and insert elem = function | [] -> [elem] - | x :: l -> + | x :: l -> if elem < x then elem :: x :: l else x :: insert elem l;; (* Imperative features *) diff --git a/rhodecode/public/js/mode/pascal/index.html b/rhodecode/public/js/mode/pascal/index.html --- a/rhodecode/public/js/mode/pascal/index.html +++ b/rhodecode/public/js/mode/pascal/index.html @@ -16,19 +16,19 @@ (* Example Pascal code *) while a <> b do writeln('Waiting'); - -if a > b then + +if a > b then writeln('Condition met') -else +else writeln('Condition not met'); - -for i := 1 to 10 do + +for i := 1 to 10 do writeln('Iteration: ', i:1); - + repeat a := a + 1 until a = 10; - + case i of 0: write('zero'); 1: write('one'); diff --git a/rhodecode/public/js/mode/perl/index.html b/rhodecode/public/js/mode/perl/index.html --- a/rhodecode/public/js/mode/perl/index.html +++ b/rhodecode/public/js/mode/perl/index.html @@ -23,7 +23,7 @@ our $s2 = q(multi- line); =item Something - Example. + Example. =cut my $html=<<'HTML' @@ -35,13 +35,13 @@ HTML print "first,".join(',', 'second', qq~third~); if($s1 =~ m[(?<!\s)(l.ne)\z]o) { - $h->{$1}=$$.' predefined variables'; - $s2 =~ s/\-line//ox; - $s1 =~ s[ - line ] - [ - block - ]ox; + $h->{$1}=$$.' predefined variables'; + $s2 =~ s/\-line//ox; + $s1 =~ s[ + line ] + [ + block + ]ox; } 1; # numbers and comments diff --git a/rhodecode/public/js/mode/php/index.html b/rhodecode/public/js/mode/php/index.html --- a/rhodecode/public/js/mode/php/index.html +++ b/rhodecode/public/js/mode/php/index.html @@ -21,12 +21,12 @@ <form><textarea id="code" name="code"> <?php function hello($who) { - return "Hello " . $who; + return "Hello " . $who; } ?> <p>The program says <?= hello("World") ?>.</p> <script> - alert("And here is some JS code"); // also colored + alert("And here is some JS code"); // also colored </script> </textarea></form> diff --git a/rhodecode/public/js/mode/pig/index.html b/rhodecode/public/js/mode/pig/index.html --- a/rhodecode/public/js/mode/pig/index.html +++ b/rhodecode/public/js/mode/pig/index.html @@ -14,7 +14,7 @@ <form><textarea id="code" name="code"> -- Apache Pig (Pig Latin Language) Demo -/* +/* This is a multiline comment. */ a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray); diff --git a/rhodecode/public/js/mode/python/LICENSE.txt b/rhodecode/public/js/mode/python/LICENSE.txt --- a/rhodecode/public/js/mode/python/LICENSE.txt +++ b/rhodecode/public/js/mode/python/LICENSE.txt @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NON AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/rhodecode/public/js/mode/python/index.html b/rhodecode/public/js/mode/python/index.html --- a/rhodecode/public/js/mode/python/index.html +++ b/rhodecode/public/js/mode/python/index.html @@ -12,7 +12,7 @@ </head> <body> <h1>CodeMirror: Python mode</h1> - + <div><textarea id="code" name="code"> # Literals 1234 diff --git a/rhodecode/public/js/mode/q/index.html b/rhodecode/public/js/mode/q/index.html --- a/rhodecode/public/js/mode/q/index.html +++ b/rhodecode/public/js/mode/q/index.html @@ -15,23 +15,23 @@ <div><textarea id="code" name="code"> / utilities to quickly load a csv file - for more exhaustive analysis of the csv contents see csvguess.q -/ 2009.09.20 - updated to match latest csvguess.q +/ 2009.09.20 - updated to match latest csvguess.q / .csv.colhdrs[file] - return a list of colhdrs from file / info:.csv.info[file] - return a table of information about the file -/ columns are: -/ c - column name; ci - column index; t - load type; mw - max width; -/ dchar - distinct characters in values; rule - rule that caught the type -/ maybe - needs checking, _could_ be say a date, but perhaps just a float? +/ columns are: +/ c - column name; ci - column index; t - load type; mw - max width; +/ dchar - distinct characters in values; rule - rule that caught the type +/ maybe - needs checking, _could_ be say a date, but perhaps just a float? / .csv.info0[file;onlycols] - like .csv.info except that it only analyses <onlycols> / example: -/ info:.csv.info0[file;(.csv.colhdrs file)like"*price"] -/ info:.csv.infolike[file;"*price"] -/ show delete from info where t=" " +/ info:.csv.info0[file;(.csv.colhdrs file)like"*price"] +/ info:.csv.infolike[file;"*price"] +/ show delete from info where t=" " / .csv.data[file;info] - use the info from .csv.info to read the data / .csv.data10[file;info] - like .csv.data but only returns the first 10 rows / bulkload[file;info] - bulk loads file into table DATA (which must be already defined :: DATA:() ) -/ .csv.read[file]/read10[file] - for when you don't care about checking/tweaking the <info> before reading +/ .csv.read[file]/read10[file] - for when you don't care about checking/tweaking the <info> before reading \d .csv DELIM:"," @@ -49,74 +49,74 @@ k)fs2:{[f;s]((-7!s)>){[f;s;x]i:1+last@&0 cleanhdrs:{{$[ZAPHDRS;lower x except"_";x]}x where x in DELIM,.Q.an} cancast:{nw:x$"";if[not x in"BXCS";nw:(min 0#;max 0#;::)@\:nw];$[not any nw in x$(11&count y)#y;$[11<count y;not any nw in x$y;1b];0b]} -read:{[file]data[file;info[file]]} -read10:{[file]data10[file;info[file]]} +read:{[file]data[file;info[file]]} +read10:{[file]data10[file;info[file]]} colhdrs:{[file] - `$nameltrim DELIM vs cleanhdrs first read0(file;0;1+first where 0xa=read1(file;0;WIDTHHDR))} + `$nameltrim DELIM vs cleanhdrs first read0(file;0;1+first where 0xa=read1(file;0;WIDTHHDR))} data:{[file;info] - (exec c from info where not t=" ")xcol(exec t from info;enlist DELIM)0:file} + (exec c from info where not t=" ")xcol(exec t from info;enlist DELIM)0:file} data10:{[file;info] - data[;info](file;0;1+last 11#where 0xa=read1(file;0;15*WIDTHHDR))} + data[;info](file;0;1+last 11#where 0xa=read1(file;0;15*WIDTHHDR))} info0:{[file;onlycols] - colhdrs:`$nameltrim DELIM vs cleanhdrs first head:read0(file;0;1+last where 0xa=read1(file;0;WIDTHHDR)); - loadfmts:(count colhdrs)#"S";if[count onlycols;loadfmts[where not colhdrs in onlycols]:"C"]; - breaks:where 0xa=read1(file;0;floor(10+READLINES)*WIDTHHDR%count head); - nas:count as:colhdrs xcol(loadfmts;enlist DELIM)0:(file;0;1+last((1+READLINES)&count breaks)#breaks); - info:([]c:key flip as;v:value flip as);as:(); - reserved:key`.q;reserved,:.Q.res;reserved,:`i; - info:update res:c in reserved from info; - info:update ci:i,t:"?",ipa:0b,mdot:0,mw:0,rule:0,gr:0,ndv:0,maybe:0b,empty:0b,j10:0b,j12:0b from info; - info:update ci:`s#ci from info; - if[count onlycols;info:update t:" ",rule:10 from info where not c in onlycols]; - info:update sdv:{string(distinct x)except`}peach v from info; - info:update ndv:count each sdv from info; - info:update gr:floor 0.5+100*ndv%nas,mw:{max count each x}peach sdv from info where 0<ndv; - info:update t:"*",rule:20 from info where mw>.csv.FORCECHARWIDTH; / long values - info:update t:"C "[.csv.DISCARDEMPTY],rule:30,empty:1b from info where t="?",mw=0; / empty columns - info:update dchar:{asc distinct raze x}peach sdv from info where t="?"; - info:update mdot:{max sum each"."=x}peach sdv from info where t="?",{"."in x}each dchar; - info:update t:"n",rule:40 from info where t="?",{any x in"0123456789"}each dchar; / vaguely numeric.. - info:update t:"I",rule:50,ipa:1b from info where t="n",mw within 7 15,mdot=3,{all x in".0123456789"}each dchar,.csv.cancast["I"]peach sdv; / ip-address - info:update t:"J",rule:60 from info where t="n",mdot=0,{all x in"+-0123456789"}each dchar,.csv.cancast["J"]peach sdv; - info:update t:"I",rule:70 from info where t="J",mw<12,.csv.cancast["I"]peach sdv; - info:update t:"H",rule:80 from info where t="I",mw<7,.csv.cancast["H"]peach sdv; - info:update t:"F",rule:90 from info where t="n",mdot<2,mw>1,.csv.cancast["F"]peach sdv; - info:update t:"E",rule:100,maybe:1b from info where t="F",mw<9; - info:update t:"M",rule:110,maybe:1b from info where t in"nIHEF",mdot<2,mw within 4 7,.csv.cancast["M"]peach sdv; - info:update t:"D",rule:120,maybe:1b from info where t in"nI",mdot in 0 2,mw within 6 11,.csv.cancast["D"]peach sdv; - info:update t:"V",rule:130,maybe:1b from info where t="I",mw in 5 6,7<count each dchar,{all x like"*[0-9][0-5][0-9][0-5][0-9]"}peach sdv,.csv.cancast["V"]peach sdv; / 235959 12345 - info:update t:"U",rule:140,maybe:1b from info where t="H",mw in 3 4,7<count each dchar,{all x like"*[0-9][0-5][0-9]"}peach sdv,.csv.cancast["U"]peach sdv; /2359 - info:update t:"U",rule:150,maybe:0b from info where t="n",mw in 4 5,mdot=0,{all x like"*[0-9]:[0-5][0-9]"}peach sdv,.csv.cancast["U"]peach sdv; - info:update t:"T",rule:160,maybe:0b from info where t="n",mw within 7 12,mdot<2,{all x like"*[0-9]:[0-5][0-9]:[0-5][0-9]*"}peach sdv,.csv.cancast["T"]peach sdv; - info:update t:"V",rule:170,maybe:0b from info where t="T",mw in 7 8,mdot=0,.csv.cancast["V"]peach sdv; - info:update t:"T",rule:180,maybe:1b from info where t in"EF",mw within 7 10,mdot=1,{all x like"*[0-9][0-5][0-9][0-5][0-9].*"}peach sdv,.csv.cancast["T"]peach sdv; - info:update t:"Z",rule:190,maybe:0b from info where t="n",mw within 11 24,mdot<4,.csv.cancast["Z"]peach sdv; - info:update t:"P",rule:200,maybe:1b from info where t="n",mw within 12 29,mdot<4,{all x like"[12]*"}peach sdv,.csv.cancast["P"]peach sdv; - info:update t:"N",rule:210,maybe:1b from info where t="n",mw within 3 28,mdot=1,.csv.cancast["N"]peach sdv; - info:update t:"?",rule:220,maybe:0b from info where t="n"; / reset remaining maybe numeric - info:update t:"C",rule:230,maybe:0b from info where t="?",mw=1; / char - info:update t:"B",rule:240,maybe:0b from info where t in"HC",mw=1,mdot=0,{$[all x in"01tTfFyYnN";(any"0fFnN"in x)and any"1tTyY"in x;0b]}each dchar; / boolean - info:update t:"B",rule:250,maybe:1b from info where t in"HC",mw=1,mdot=0,{all x in"01tTfFyYnN"}each dchar; / boolean - info:update t:"X",rule:260,maybe:0b from info where t="?",mw=2,{$[all x in"0123456789abcdefABCDEF";(any .Q.n in x)and any"abcdefABCDEF"in x;0b]}each dchar; /hex - info:update t:"S",rule:270,maybe:1b from info where t="?",mw<.csv.SYMMAXWIDTH,mw>1,gr<.csv.SYMMAXGR; / symbols (max width permitting) - info:update t:"*",rule:280,maybe:0b from info where t="?"; / the rest as strings - / flag those S/* columns which could be encoded to integers (.Q.j10/x10/j12/x12) to avoid symbols - info:update j12:1b from info where t in"S*",mw<13,{all x in .Q.nA}each dchar; - info:update j10:1b from info where t in"S*",mw<11,{all x in .Q.b6}each dchar; - select c,ci,t,maybe,empty,res,j10,j12,ipa,mw,mdot,rule,gr,ndv,dchar from info} + colhdrs:`$nameltrim DELIM vs cleanhdrs first head:read0(file;0;1+last where 0xa=read1(file;0;WIDTHHDR)); + loadfmts:(count colhdrs)#"S";if[count onlycols;loadfmts[where not colhdrs in onlycols]:"C"]; + breaks:where 0xa=read1(file;0;floor(10+READLINES)*WIDTHHDR%count head); + nas:count as:colhdrs xcol(loadfmts;enlist DELIM)0:(file;0;1+last((1+READLINES)&count breaks)#breaks); + info:([]c:key flip as;v:value flip as);as:(); + reserved:key`.q;reserved,:.Q.res;reserved,:`i; + info:update res:c in reserved from info; + info:update ci:i,t:"?",ipa:0b,mdot:0,mw:0,rule:0,gr:0,ndv:0,maybe:0b,empty:0b,j10:0b,j12:0b from info; + info:update ci:`s#ci from info; + if[count onlycols;info:update t:" ",rule:10 from info where not c in onlycols]; + info:update sdv:{string(distinct x)except`}peach v from info; + info:update ndv:count each sdv from info; + info:update gr:floor 0.5+100*ndv%nas,mw:{max count each x}peach sdv from info where 0<ndv; + info:update t:"*",rule:20 from info where mw>.csv.FORCECHARWIDTH; / long values + info:update t:"C "[.csv.DISCARDEMPTY],rule:30,empty:1b from info where t="?",mw=0; / empty columns + info:update dchar:{asc distinct raze x}peach sdv from info where t="?"; + info:update mdot:{max sum each"."=x}peach sdv from info where t="?",{"."in x}each dchar; + info:update t:"n",rule:40 from info where t="?",{any x in"0123456789"}each dchar; / vaguely numeric.. + info:update t:"I",rule:50,ipa:1b from info where t="n",mw within 7 15,mdot=3,{all x in".0123456789"}each dchar,.csv.cancast["I"]peach sdv; / ip-address + info:update t:"J",rule:60 from info where t="n",mdot=0,{all x in"+-0123456789"}each dchar,.csv.cancast["J"]peach sdv; + info:update t:"I",rule:70 from info where t="J",mw<12,.csv.cancast["I"]peach sdv; + info:update t:"H",rule:80 from info where t="I",mw<7,.csv.cancast["H"]peach sdv; + info:update t:"F",rule:90 from info where t="n",mdot<2,mw>1,.csv.cancast["F"]peach sdv; + info:update t:"E",rule:100,maybe:1b from info where t="F",mw<9; + info:update t:"M",rule:110,maybe:1b from info where t in"nIHEF",mdot<2,mw within 4 7,.csv.cancast["M"]peach sdv; + info:update t:"D",rule:120,maybe:1b from info where t in"nI",mdot in 0 2,mw within 6 11,.csv.cancast["D"]peach sdv; + info:update t:"V",rule:130,maybe:1b from info where t="I",mw in 5 6,7<count each dchar,{all x like"*[0-9][0-5][0-9][0-5][0-9]"}peach sdv,.csv.cancast["V"]peach sdv; / 235959 12345 + info:update t:"U",rule:140,maybe:1b from info where t="H",mw in 3 4,7<count each dchar,{all x like"*[0-9][0-5][0-9]"}peach sdv,.csv.cancast["U"]peach sdv; /2359 + info:update t:"U",rule:150,maybe:0b from info where t="n",mw in 4 5,mdot=0,{all x like"*[0-9]:[0-5][0-9]"}peach sdv,.csv.cancast["U"]peach sdv; + info:update t:"T",rule:160,maybe:0b from info where t="n",mw within 7 12,mdot<2,{all x like"*[0-9]:[0-5][0-9]:[0-5][0-9]*"}peach sdv,.csv.cancast["T"]peach sdv; + info:update t:"V",rule:170,maybe:0b from info where t="T",mw in 7 8,mdot=0,.csv.cancast["V"]peach sdv; + info:update t:"T",rule:180,maybe:1b from info where t in"EF",mw within 7 10,mdot=1,{all x like"*[0-9][0-5][0-9][0-5][0-9].*"}peach sdv,.csv.cancast["T"]peach sdv; + info:update t:"Z",rule:190,maybe:0b from info where t="n",mw within 11 24,mdot<4,.csv.cancast["Z"]peach sdv; + info:update t:"P",rule:200,maybe:1b from info where t="n",mw within 12 29,mdot<4,{all x like"[12]*"}peach sdv,.csv.cancast["P"]peach sdv; + info:update t:"N",rule:210,maybe:1b from info where t="n",mw within 3 28,mdot=1,.csv.cancast["N"]peach sdv; + info:update t:"?",rule:220,maybe:0b from info where t="n"; / reset remaining maybe numeric + info:update t:"C",rule:230,maybe:0b from info where t="?",mw=1; / char + info:update t:"B",rule:240,maybe:0b from info where t in"HC",mw=1,mdot=0,{$[all x in"01tTfFyYnN";(any"0fFnN"in x)and any"1tTyY"in x;0b]}each dchar; / boolean + info:update t:"B",rule:250,maybe:1b from info where t in"HC",mw=1,mdot=0,{all x in"01tTfFyYnN"}each dchar; / boolean + info:update t:"X",rule:260,maybe:0b from info where t="?",mw=2,{$[all x in"0123456789abcdefABCDEF";(any .Q.n in x)and any"abcdefABCDEF"in x;0b]}each dchar; /hex + info:update t:"S",rule:270,maybe:1b from info where t="?",mw<.csv.SYMMAXWIDTH,mw>1,gr<.csv.SYMMAXGR; / symbols (max width permitting) + info:update t:"*",rule:280,maybe:0b from info where t="?"; / the rest as strings + / flag those S/* columns which could be encoded to integers (.Q.j10/x10/j12/x12) to avoid symbols + info:update j12:1b from info where t in"S*",mw<13,{all x in .Q.nA}each dchar; + info:update j10:1b from info where t in"S*",mw<11,{all x in .Q.b6}each dchar; + select c,ci,t,maybe,empty,res,j10,j12,ipa,mw,mdot,rule,gr,ndv,dchar from info} info:info0[;()] / by default don't restrict columns infolike:{[file;pattern] info0[file;{x where x like y}[lower colhdrs[file];pattern]]} / .csv.infolike[file;"*time"] \d . / DATA:() bulkload:{[file;info] - if[not`DATA in system"v";'`DATA.not.defined]; - if[count DATA;'`DATA.not.empty]; - loadhdrs:exec c from info where not t=" ";loadfmts:exec t from info; - .csv.fs2[{[file;loadhdrs;loadfmts] `DATA insert $[count DATA;flip loadhdrs!(loadfmts;.csv.DELIM)0:file;loadhdrs xcol(loadfmts;enlist .csv.DELIM)0:file]}[file;loadhdrs;loadfmts]]; - count DATA} -@[.:;"\\l csvutil.custom.q";::]; / save your custom settings in csvutil.custom.q to override those set at the beginning of the file + if[not`DATA in system"v";'`DATA.not.defined]; + if[count DATA;'`DATA.not.empty]; + loadhdrs:exec c from info where not t=" ";loadfmts:exec t from info; + .csv.fs2[{[file;loadhdrs;loadfmts] `DATA insert $[count DATA;flip loadhdrs!(loadfmts;.csv.DELIM)0:file;loadhdrs xcol(loadfmts;enlist .csv.DELIM)0:file]}[file;loadhdrs;loadfmts]]; + count DATA} +@[.:;"\\l csvutil.custom.q";::]; / save your custom settings in csvutil.custom.q to override those set at the beginning of the file </textarea></div> <script> diff --git a/rhodecode/public/js/mode/rpm/changes/index.html b/rhodecode/public/js/mode/rpm/changes/index.html --- a/rhodecode/public/js/mode/rpm/changes/index.html +++ b/rhodecode/public/js/mode/rpm/changes/index.html @@ -11,7 +11,7 @@ </head> <body> <h1>CodeMirror: RPM changes mode</h1> - + <div><textarea id="code" name="code"> ------------------------------------------------------------------- Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com diff --git a/rhodecode/public/js/mode/rpm/spec/index.html b/rhodecode/public/js/mode/rpm/spec/index.html --- a/rhodecode/public/js/mode/rpm/spec/index.html +++ b/rhodecode/public/js/mode/rpm/spec/index.html @@ -12,7 +12,7 @@ </head> <body> <h1>CodeMirror: RPM spec mode</h1> - + <div><textarea id="code" name="code"> # # spec file for package minidlna diff --git a/rhodecode/public/js/mode/rst/LICENSE.txt b/rhodecode/public/js/mode/rst/LICENSE.txt --- a/rhodecode/public/js/mode/rst/LICENSE.txt +++ b/rhodecode/public/js/mode/rst/LICENSE.txt @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NON AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/rhodecode/public/js/mode/rst/index.html b/rhodecode/public/js/mode/rst/index.html --- a/rhodecode/public/js/mode/rst/index.html +++ b/rhodecode/public/js/mode/rst/index.html @@ -521,4 +521,3 @@ There are some problems one commonly run <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p> </body> </html> - diff --git a/rhodecode/public/js/mode/ruby/index.html b/rhodecode/public/js/mode/ruby/index.html --- a/rhodecode/public/js/mode/ruby/index.html +++ b/rhodecode/public/js/mode/ruby/index.html @@ -50,7 +50,7 @@ def readints(prompt) print prompt line = readline.chomp raise EOFError.new if line == 'quit' # You can also use a real EOF. - + # Go through each item on the line, converting each one and adding it # to retval. retval = [ ] @@ -99,16 +99,16 @@ def polystr(p) result = (if p[0][0] < 0 then "-" else "" end) + term_to_str(*p[0]) # Convert the rest of the terms, in each case adding the appropriate - # + or - separating them. + # + or - separating them. for term in p[1...p.length] # Add the separator then the rep. of the term. - result += (if term[0] < 0 then " - " else " + " end) + + result += (if term[0] < 0 then " - " else " + " end) + term_to_str(*term) end return result end - + # # Run until some kind of endfile. begin diff --git a/rhodecode/public/js/mode/scheme/index.html b/rhodecode/public/js/mode/scheme/index.html --- a/rhodecode/public/js/mode/scheme/index.html +++ b/rhodecode/public/js/mode/scheme/index.html @@ -15,21 +15,21 @@ ; See if the input starts with a given symbol. (define (match-symbol input pattern) (cond ((null? (remain input)) #f) - ((eqv? (car (remain input)) pattern) (r-cdr input)) - (else #f))) + ((eqv? (car (remain input)) pattern) (r-cdr input)) + (else #f))) ; Allow the input to start with one of a list of patterns. (define (match-or input pattern) (cond ((null? pattern) #f) - ((match-pattern input (car pattern))) - (else (match-or input (cdr pattern))))) + ((match-pattern input (car pattern))) + (else (match-or input (cdr pattern))))) ; Allow a sequence of patterns. (define (match-seq input pattern) (if (null? pattern) input (let ((match (match-pattern input (car pattern)))) - (if match (match-seq match (cdr pattern)) #f)))) + (if match (match-seq match (cdr pattern)) #f)))) ; Match with the pattern but no problem if it does not match. (define (match-opt input pattern) @@ -42,18 +42,18 @@ ; of the sentence. (define (match-any input pattern) (cond ((null? (remain input)) #f) - ((null? pattern) (f-cons (remain input) (clear-remain input))) - (else - (let ((accum-any (collector))) - (define (match-pattern-any input pattern) - (cond ((null? (remain input)) #f) - (else (accum-any (car (remain input))) - (cond ((match-pattern (r-cdr input) pattern)) - (else (match-pattern-any (r-cdr input) pattern)))))) - (let ((retval (match-pattern-any input (car pattern)))) - (if retval - (f-cons (accum-any) retval) - #f)))))) + ((null? pattern) (f-cons (remain input) (clear-remain input))) + (else + (let ((accum-any (collector))) + (define (match-pattern-any input pattern) + (cond ((null? (remain input)) #f) + (else (accum-any (car (remain input))) + (cond ((match-pattern (r-cdr input) pattern)) + (else (match-pattern-any (r-cdr input) pattern)))))) + (let ((retval (match-pattern-any input (car pattern)))) + (if retval + (f-cons (accum-any) retval) + #f)))))) </textarea></form> <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), {}); diff --git a/rhodecode/public/js/mode/smalltalk/index.html b/rhodecode/public/js/mode/smalltalk/index.html --- a/rhodecode/public/js/mode/smalltalk/index.html +++ b/rhodecode/public/js/mode/smalltalk/index.html @@ -18,7 +18,7 @@ <h1>CodeMirror: Smalltalk mode</h1> <form><textarea id="code" name="code"> -" +" This is a test of the Smalltalk code " Seaside.WAComponent subclass: #MyCounter [ diff --git a/rhodecode/public/js/mode/smarty/index.html b/rhodecode/public/js/mode/smarty/index.html --- a/rhodecode/public/js/mode/smarty/index.html +++ b/rhodecode/public/js/mode/smarty/index.html @@ -12,7 +12,7 @@ <body> <h1>CodeMirror: Smarty mode</h1> - <h3>Default settings (Smarty 2, <b>{</b> and <b>}</b> delimiters)</h3> + <h3>Default settings (Smarty 2, <b>{</b> and <b>}</b> delimiters)</h3> <form><textarea id="code" name="code"> {extends file="parent.tpl"} {include file="template.tpl"} @@ -44,7 +44,7 @@ <br /> - <h3>Smarty 2, custom delimiters</h3> + <h3>Smarty 2, custom delimiters</h3> <form><textarea id="code2" name="code2"> {--extends file="parent.tpl"--} {--include file="template.tpl"--} @@ -78,16 +78,16 @@ }); </script> - <br /> + <br /> - <h3>Smarty 3</h3> + <h3>Smarty 3</h3> - <textarea id="code3" name="code3"> + <textarea id="code3" name="code3"> Nested tags {$foo={counter one=1 two={inception}}+3} are now valid in Smarty 3. <script> function test() { - console.log("Smarty 3 permits single curly braces followed by whitespace to NOT slip into Smarty mode."); + console.log("Smarty 3 permits single curly braces followed by whitespace to NOT slip into Smarty mode."); } </script> @@ -110,13 +110,13 @@ Smarty "dot" syntax (note: embedded {} a {$object->method1($x)->method2($y)}</textarea> - <script> - var editor = CodeMirror.fromTextArea(document.getElementById("code3"), { - lineNumbers: true, - mode: "smarty", - smartyVersion: 3 - }); - </script> + <script> + var editor = CodeMirror.fromTextArea(document.getElementById("code3"), { + lineNumbers: true, + mode: "smarty", + smartyVersion: 3 + }); + </script> <p>A plain text/Smarty version 2 or 3 mode, which allows for custom delimiter tags.</p> diff --git a/rhodecode/public/js/mode/sql/index.html b/rhodecode/public/js/mode/sql/index.html --- a/rhodecode/public/js/mode/sql/index.html +++ b/rhodecode/public/js/mode/sql/index.html @@ -38,21 +38,21 @@ var init = function() { <form> <textarea id="code" name="code">-- SQL Mode for CodeMirror SELECT SQL_NO_CACHE DISTINCT - @var1 AS `val1`, @'val2', @global.'sql_mode', - 1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`, - 0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`, - DATE '1994-01-01' AS `sql_date`, { T "1994-01-01" } AS `odbc_date`, - 'my string', _utf8'your string', N'her string', + @var1 AS `val1`, @'val2', @global.'sql_mode', + 1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`, + 0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`, + DATE '1994-01-01' AS `sql_date`, { T "1994-01-01" } AS `odbc_date`, + 'my string', _utf8'your string', N'her string', TRUE, FALSE, UNKNOWN - FROM DUAL - -- space needed after '--' - # 1 line comment - /* multiline - comment! */ - LIMIT 1 OFFSET 0; + FROM DUAL + -- space needed after '--' + # 1 line comment + /* multiline + comment! */ + LIMIT 1 OFFSET 0; </textarea> </form> - <p><strong>MIME types defined:</strong> + <p><strong>MIME types defined:</strong> <code><a href="?mime=text/x-sql">text/x-sql</a></code>, <code><a href="?mime=text/x-mysql">text/x-mysql</a></code>, <code><a href="?mime=text/x-mariadb">text/x-mariadb</a></code>, diff --git a/rhodecode/public/js/mode/stex/index.html b/rhodecode/public/js/mode/stex/index.html --- a/rhodecode/public/js/mode/stex/index.html +++ b/rhodecode/public/js/mode/stex/index.html @@ -20,11 +20,11 @@ \frametitle{Size Lemma for Balanced Trees} \begin{itemize} \item - \begin{assertion}[id=size-lemma,type=lemma] - Let $G=\tup{V,E}$ be a \termref[cd=binary-trees]{balanced binary tree} + \begin{assertion}[id=size-lemma,type=lemma] + Let $G=\tup{V,E}$ be a \termref[cd=binary-trees]{balanced binary tree} of \termref[cd=graph-depth,name=vertex-depth]{depth}$n>i$, then the set $\defeq{\livar{V}i}{\setst{\inset{v}{V}}{\gdepth{v} = i}}$ of - \termref[cd=graphs-intro,name=node]{nodes} at + \termref[cd=graphs-intro,name=node]{nodes} at \termref[cd=graph-depth,name=vertex-depth]{depth} $i$ has \termref[cd=cardinality,name=cardinality]{cardinality} $\power2i$. \end{assertion} @@ -39,7 +39,7 @@ \end{spfcase} \begin{spfcase}{$i>0$} \begin{spfstep}[display=flow] - then $\livar{V}{i-1}$ contains $\power2{i-1}$ vertexes + then $\livar{V}{i-1}$ contains $\power2{i-1}$ vertexes \begin{justification}[method=byIH](IH)\end{justification} \end{spfstep} \begin{spfstep} @@ -57,8 +57,8 @@ \end{spfcase} \end{spfcases} \end{sproof} - \item - \begin{assertion}[id=fbbt,type=corollary] + \item + \begin{assertion}[id=fbbt,type=corollary] A fully balanced tree of depth $d$ has $\power2{d+1}-1$ nodes. \end{assertion} \item @@ -81,7 +81,7 @@ \end{note} \end{module} -%%% Local Variables: +%%% Local Variables: %%% mode: LaTeX %%% TeX-master: "all" %%% End: \end{document} diff --git a/rhodecode/public/js/mode/tcl/index.html b/rhodecode/public/js/mode/tcl/index.html --- a/rhodecode/public/js/mode/tcl/index.html +++ b/rhodecode/public/js/mode/tcl/index.html @@ -63,13 +63,13 @@ namespace eval whois { proc whois::311 {from key text} { if {[regexp -- {^[^\s]+\s(.+?)\s(.+?)\s(.+?)\s\*\s\:(.+)$} $text wholematch nick ident host realname]} { putserv "PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Host:${whois::textf} \ - $nick \(${ident}@${host}\) ${whois::tagf}Realname:${whois::textf} $realname" + $nick \(${ident}@${host}\) ${whois::tagf}Realname:${whois::textf} $realname" } } proc whois::multi {from key text} { if {[regexp {\:(.*)$} $text match $key]} { putserv "PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Note:${whois::textf} [subst $$key]" - return 1 + return 1 } } proc whois::312 {from key text} { @@ -84,7 +84,7 @@ proc whois::319 {from key text} { proc whois::317 {from key text} { if {[regexp -- {.*\s(\d+)\s(\d+)\s\:} $text wholematch idle signon]} { putserv "PRIVMSG $whois::channel :${whois::logo} ${whois::tagf}Connected:${whois::textf} \ - [ctime $signon] ${whois::tagf}Idle:${whois::textf} [duration $idle]" + [ctime $signon] ${whois::tagf}Idle:${whois::textf} [duration $idle]" } } proc whois::301 {from key text} { @@ -94,7 +94,7 @@ proc whois::301 {from key text} { } proc whois::318 {from key text} { namespace eval whois { - variable channel "" + variable channel "" } variable whois::channel "" } @@ -104,8 +104,8 @@ proc whois::307 {from key text} { proc whois::list {nick host hand chan text} { if {[lsearch -exact [channel info $chan] "+${whois::command}"] != -1} { namespace eval whois { - variable channel "" - } + variable channel "" + } variable whois::channel $chan putserv "WHOIS $text" } @@ -116,7 +116,7 @@ Ford_Lawnmower irc.GeekShed.net #Script- <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { tabMode: "indent", - theme: "night", + theme: "night", lineNumbers: true, indentUnit: 2, mode: "text/x-tcl" diff --git a/rhodecode/public/js/mode/tiddlywiki/index.html b/rhodecode/public/js/mode/tiddlywiki/index.html --- a/rhodecode/public/js/mode/tiddlywiki/index.html +++ b/rhodecode/public/js/mode/tiddlywiki/index.html @@ -128,7 +128,7 @@ cf. [[TiddlyWiki.com|http://www.tiddlywi <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { - mode: 'tiddlywiki', + mode: 'tiddlywiki', lineNumbers: true, enterMode: 'keep', matchBrackets: true diff --git a/rhodecode/public/js/mode/tiki/index.html b/rhodecode/public/js/mode/tiki/index.html --- a/rhodecode/public/js/mode/tiki/index.html +++ b/rhodecode/public/js/mode/tiki/index.html @@ -71,8 +71,8 @@ Plugin (inline): </textarea></div> <script type="text/javascript"> - var editor = CodeMirror.fromTextArea(document.getElementById("code"), { - mode: 'tiki', + var editor = CodeMirror.fromTextArea(document.getElementById("code"), { + mode: 'tiki', lineNumbers: true }); </script> diff --git a/rhodecode/public/js/mode/tiki/tiki.css b/rhodecode/public/js/mode/tiki/tiki.css --- a/rhodecode/public/js/mode/tiki/tiki.css +++ b/rhodecode/public/js/mode/tiki/tiki.css @@ -1,26 +1,26 @@ .cm-tw-syntaxerror { - color: #FFF; - background-color: #900; + color: #FFF; + background-color: #900; } .cm-tw-deleted { - text-decoration: line-through; + text-decoration: line-through; } .cm-tw-header5 { - font-weight: bold; + font-weight: bold; } .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ - padding-left: 10px; + padding-left: 10px; } .cm-tw-box { - border-top-width: 0px ! important; - border-style: solid; - border-width: 1px; - border-color: inherit; + border-top-width: 0px ! important; + border-style: solid; + border-width: 1px; + border-color: inherit; } .cm-tw-underline { - text-decoration: underline; -} \ No newline at end of file + text-decoration: underline; +} diff --git a/rhodecode/public/js/mode/turtle/index.html b/rhodecode/public/js/mode/turtle/index.html --- a/rhodecode/public/js/mode/turtle/index.html +++ b/rhodecode/public/js/mode/turtle/index.html @@ -16,7 +16,7 @@ @prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -<http://purl.org/net/bsletten> +<http://purl.org/net/bsletten> a foaf:Person; foaf:interest <http://www.w3.org/2000/01/sw/>; foaf:based_near [ diff --git a/rhodecode/public/js/mode/vb/index.html b/rhodecode/public/js/mode/vb/index.html --- a/rhodecode/public/js/mode/vb/index.html +++ b/rhodecode/public/js/mode/vb/index.html @@ -11,7 +11,7 @@ .CodeMirror {border: 1px solid #aaa; height:210px; height: auto;} .CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;} .CodeMirror pre { font-family: Inconsolata; font-size: 14px} - </style> + </style> <script type="text/javascript" src="../../addon/runmode/runmode.js"></script> </head> <body onload="init()"> @@ -21,7 +21,7 @@ function test(golden, text) { var ok = true; var i = 0; function callback(token, style, lineNo, pos){ - //console.log(String(token) + " " + String(style) + " " + String(lineNo) + " " + String(pos)); + //console.log(String(token) + " " + String(style) + " " + String(lineNo) + " " + String(pos)); var result = [String(token), String(style)]; if (golden[i][0] != result[0] || golden[i][1] != result[1]){ return "Error, expected: " + String(golden[i]) + ", got: " + String(result); @@ -29,7 +29,7 @@ function test(golden, text) { } i++; } - CodeMirror.runMode(text, "text/x-vb",callback); + CodeMirror.runMode(text, "text/x-vb",callback); if (ok) return "Tests OK"; } @@ -72,9 +72,9 @@ function init() { runTest(); } function runTest() { - document.getElementById('testresult').innerHTML = testAll(); + document.getElementById('testresult').innerHTML = testAll(); initText(editor); - + } </script> diff --git a/rhodecode/public/js/mode/vbscript/index.html b/rhodecode/public/js/mode/vbscript/index.html --- a/rhodecode/public/js/mode/vbscript/index.html +++ b/rhodecode/public/js/mode/vbscript/index.html @@ -23,10 +23,10 @@ Const ForReading = 1, ForWriting = 2, Fo Call Sub020_PostBroadcastToUrbanAirship(strUserName, strPassword, intTransmitID, strResponse) If Not IsNull(strResponse) AND Len(strResponse) = 0 Then - boolTransmitOkYN = False + boolTransmitOkYN = False Else - ' WScript.Echo "Oh Happy Day! Oh Happy DAY!" - boolTransmitOkYN = True + ' WScript.Echo "Oh Happy Day! Oh Happy DAY!" + boolTransmitOkYN = True End If </textarea></div> @@ -39,4 +39,3 @@ End If <p><strong>MIME types defined:</strong> <code>text/vbscript</code>.</p> </body> </html> - diff --git a/rhodecode/public/js/mode/verilog/index.html b/rhodecode/public/js/mode/verilog/index.html --- a/rhodecode/public/js/mode/verilog/index.html +++ b/rhodecode/public/js/mode/verilog/index.html @@ -72,7 +72,7 @@ module butterfly assign ya_im = xa_im_z + xbw_im; assign yb_re = xa_re_z - xbw_re; assign yb_im = xa_im_z - xbw_im; - + // Create the multiply module. multiply_complex #(WIDTH) multiply_complex_0 (.clk(clk), @@ -101,7 +101,7 @@ module butterfly end end end - + endmodule </textarea></form> diff --git a/rhodecode/public/js/mode/xquery/index.html b/rhodecode/public/js/mode/xquery/index.html --- a/rhodecode/public/js/mode/xquery/index.html +++ b/rhodecode/public/js/mode/xquery/index.html @@ -1,5 +1,5 @@ -<!doctype html> -<html> +<!doctype html> +<html> <!-- /* Copyright (C) 2011 by MarkLogic Corporation @@ -24,39 +24,39 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR THE SOFTWARE. */ --> - <head> + <head> <meta charset="utf-8"> - <title>CodeMirror: XQuery mode</title> - <link rel="stylesheet" href="../../lib/codemirror.css"> - <script src="../../lib/codemirror.js"></script> - <script src="xquery.js"></script> - <link rel="stylesheet" href="../../doc/docs.css"> - <link rel="stylesheet" href="../../theme/xq-dark.css"> + <title>CodeMirror: XQuery mode</title> + <link rel="stylesheet" href="../../lib/codemirror.css"> + <script src="../../lib/codemirror.js"></script> + <script src="xquery.js"></script> + <link rel="stylesheet" href="../../doc/docs.css"> + <link rel="stylesheet" href="../../theme/xq-dark.css"> <style type="text/css"> - .CodeMirror { - border-top: 1px solid black; border-bottom: 1px solid black; - height:400px; - } - </style> - </head> - <body> - <h1>CodeMirror: XQuery mode</h1> - -<div class="cm-s-default"> - <textarea id="code" name="code"> + .CodeMirror { + border-top: 1px solid black; border-bottom: 1px solid black; + height:400px; + } + </style> + </head> + <body> + <h1>CodeMirror: XQuery mode</h1> + +<div class="cm-s-default"> + <textarea id="code" name="code"> xquery version "1.0-ml"; (: this is - : a + : a "comment" :) let $let := <x attr="value">"test"<func>function() $var {function()} {$var}</func></x> let $joe:=1 return element element { - attribute attribute { 1 }, - element test { 'a' }, - attribute foo { "bar" }, - fn:doc()[ foo/@bar eq $let ], - //x } - + attribute attribute { 1 }, + element test { 'a' }, + attribute foo { "bar" }, + fn:doc()[ foo/@bar eq $let ], + //x } + (: a more 'evil' test :) (: Modified Blakeley example (: with nested comment :) ... :) declare private function local:declare() {()}; @@ -65,11 +65,11 @@ declare private function local:function( declare private function local:local() {()}; let $let := <let>let $let := "let"</let> return element element { - attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } }, - attribute fn:doc { "bar" castable as xs:string }, - element text { text { "text" } }, - fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ], - //fn:doc + attribute attribute { try { xdmp:version() } catch($e) { xdmp:log($e) } }, + attribute fn:doc { "bar" castable as xs:string }, + element text { text { "text" } }, + fn:doc()[ child::eq/(@bar | attribute::attribute) eq $let ], + //fn:doc } @@ -193,29 +193,29 @@ declare function json:print-name-value($ @author Jason Hunter @version 1.0.1 - + Ported to xquery 1.0-ml; double escaped backslashes in json:escape :) declare function json:serialize($x as element()) as xs:string { string-join(('{', json:print-name-value($x), '}'), "") }; - </textarea> -</div> - - <script> + </textarea> +</div> + + <script> var editor = CodeMirror.fromTextArea(document.getElementById("code"), { lineNumbers: true, matchBrackets: true, theme: "xq-dark" }); - </script> - - <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> - - <p>Development of the CodeMirror XQuery mode was sponsored by - <a href="http://marklogic.com">MarkLogic</a> and developed by + </script> + + <p><strong>MIME types defined:</strong> <code>application/xquery</code>.</p> + + <p>Development of the CodeMirror XQuery mode was sponsored by + <a href="http://marklogic.com">MarkLogic</a> and developed by <a href="https://twitter.com/mbrevoort">Mike Brevoort</a>. </p> - - </body> + + </body> </html>