erp_app 3.0.10 → 3.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/lib/erp_app/version.rb +1 -1
  2. data/public/javascripts/erp_app/codemirror/README.md +1 -1
  3. data/public/javascripts/erp_app/codemirror/doc/compress.html +11 -3
  4. data/public/javascripts/erp_app/codemirror/doc/docs.css +16 -5
  5. data/public/javascripts/erp_app/codemirror/doc/internals.html +6 -3
  6. data/public/javascripts/erp_app/codemirror/doc/manual.html +103 -41
  7. data/public/javascripts/erp_app/codemirror/doc/oldrelease.html +43 -5
  8. data/public/javascripts/erp_app/codemirror/doc/reporting.html +6 -3
  9. data/public/javascripts/erp_app/codemirror/doc/upgrade_v2.2.html +7 -4
  10. data/public/javascripts/erp_app/codemirror/keymap/vim.js +10 -6
  11. data/public/javascripts/erp_app/codemirror/lib/codemirror.css +16 -12
  12. data/public/javascripts/erp_app/codemirror/lib/codemirror.js +699 -787
  13. data/public/javascripts/erp_app/codemirror/lib/util/closetag.js +35 -35
  14. data/public/javascripts/erp_app/codemirror/lib/util/dialog.js +4 -1
  15. data/public/javascripts/erp_app/codemirror/lib/util/formatting.js +147 -253
  16. data/public/javascripts/erp_app/codemirror/lib/util/javascript-hint.js +3 -3
  17. data/public/javascripts/erp_app/codemirror/lib/util/loadmode.js +1 -1
  18. data/public/javascripts/erp_app/codemirror/lib/util/multiplex.js +5 -9
  19. data/public/javascripts/erp_app/codemirror/lib/util/overlay.js +3 -1
  20. data/public/javascripts/erp_app/codemirror/lib/util/pig-hint.js +1 -1
  21. data/public/javascripts/erp_app/codemirror/lib/util/runmode-standalone.js +90 -0
  22. data/public/javascripts/erp_app/codemirror/lib/util/runmode.js +8 -4
  23. data/public/javascripts/erp_app/codemirror/lib/util/search.js +4 -4
  24. data/public/javascripts/erp_app/codemirror/lib/util/searchcursor.js +13 -11
  25. data/public/javascripts/erp_app/codemirror/lib/util/simple-hint.js +89 -68
  26. data/public/javascripts/erp_app/codemirror/lib/util/xml-hint.js +8 -8
  27. data/public/javascripts/erp_app/codemirror/mode/clike/clike.js +6 -2
  28. data/public/javascripts/erp_app/codemirror/mode/clike/index.html +1 -0
  29. data/public/javascripts/erp_app/codemirror/mode/clike/scala.html +1 -0
  30. data/public/javascripts/erp_app/codemirror/mode/clojure/clojure.js +8 -9
  31. data/public/javascripts/erp_app/codemirror/mode/clojure/index.html +1 -0
  32. data/public/javascripts/erp_app/codemirror/mode/coffeescript/coffeescript.js +3 -3
  33. data/public/javascripts/erp_app/codemirror/mode/coffeescript/index.html +1 -0
  34. data/public/javascripts/erp_app/codemirror/mode/commonlisp/commonlisp.js +101 -0
  35. data/public/javascripts/erp_app/codemirror/mode/commonlisp/index.html +165 -0
  36. data/public/javascripts/erp_app/codemirror/mode/css/css.js +339 -15
  37. data/public/javascripts/erp_app/codemirror/mode/css/index.html +3 -0
  38. data/public/javascripts/erp_app/codemirror/mode/css/test.js +501 -0
  39. data/public/javascripts/erp_app/codemirror/mode/diff/index.html +1 -0
  40. data/public/javascripts/erp_app/codemirror/mode/ecl/ecl.js +1 -1
  41. data/public/javascripts/erp_app/codemirror/mode/erlang/index.html +1 -0
  42. data/public/javascripts/erp_app/codemirror/mode/gfm/gfm.js +10 -4
  43. data/public/javascripts/erp_app/codemirror/mode/gfm/index.html +1 -0
  44. data/public/javascripts/erp_app/codemirror/mode/go/go.js +2 -2
  45. data/public/javascripts/erp_app/codemirror/mode/go/index.html +1 -0
  46. data/public/javascripts/erp_app/codemirror/mode/groovy/groovy.js +1 -1
  47. data/public/javascripts/erp_app/codemirror/mode/groovy/index.html +1 -0
  48. data/public/javascripts/erp_app/codemirror/mode/haskell/haskell.js +2 -2
  49. data/public/javascripts/erp_app/codemirror/mode/haskell/index.html +1 -0
  50. data/public/javascripts/erp_app/codemirror/mode/haxe/haxe.js +4 -7
  51. data/public/javascripts/erp_app/codemirror/mode/haxe/index.html +1 -0
  52. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/htmlembedded.js +8 -4
  53. data/public/javascripts/erp_app/codemirror/mode/htmlembedded/index.html +1 -0
  54. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/htmlmixed.js +12 -13
  55. data/public/javascripts/erp_app/codemirror/mode/htmlmixed/index.html +1 -0
  56. data/public/javascripts/erp_app/codemirror/mode/javascript/index.html +1 -0
  57. data/public/javascripts/erp_app/codemirror/mode/javascript/javascript.js +3 -3
  58. data/public/javascripts/erp_app/codemirror/mode/jinja2/index.html +1 -0
  59. data/public/javascripts/erp_app/codemirror/mode/less/index.html +124 -2
  60. data/public/javascripts/erp_app/codemirror/mode/less/less.js +94 -60
  61. data/public/javascripts/erp_app/codemirror/mode/lua/index.html +1 -0
  62. data/public/javascripts/erp_app/codemirror/mode/markdown/index.html +3 -0
  63. data/public/javascripts/erp_app/codemirror/mode/markdown/markdown.js +134 -20
  64. data/public/javascripts/erp_app/codemirror/mode/markdown/test.js +1084 -0
  65. data/public/javascripts/erp_app/codemirror/mode/mysql/index.html +1 -0
  66. data/public/javascripts/erp_app/codemirror/mode/ntriples/index.html +1 -0
  67. data/public/javascripts/erp_app/codemirror/mode/ntriples/ntriples.js +4 -4
  68. data/public/javascripts/erp_app/codemirror/mode/ocaml/ocaml.js +1 -1
  69. data/public/javascripts/erp_app/codemirror/mode/pascal/index.html +1 -0
  70. data/public/javascripts/erp_app/codemirror/mode/pascal/pascal.js +1 -1
  71. data/public/javascripts/erp_app/codemirror/mode/perl/index.html +1 -0
  72. data/public/javascripts/erp_app/codemirror/mode/perl/perl.js +71 -71
  73. data/public/javascripts/erp_app/codemirror/mode/php/index.html +1 -0
  74. data/public/javascripts/erp_app/codemirror/mode/php/php.js +7 -9
  75. data/public/javascripts/erp_app/codemirror/mode/pig/index.html +1 -0
  76. data/public/javascripts/erp_app/codemirror/mode/pig/pig.js +3 -3
  77. data/public/javascripts/erp_app/codemirror/mode/plsql/index.html +1 -0
  78. data/public/javascripts/erp_app/codemirror/mode/properties/index.html +1 -0
  79. data/public/javascripts/erp_app/codemirror/mode/python/index.html +1 -0
  80. data/public/javascripts/erp_app/codemirror/mode/python/python.js +1 -1
  81. data/public/javascripts/erp_app/codemirror/mode/r/index.html +1 -0
  82. data/public/javascripts/erp_app/codemirror/mode/rpm/changes/index.html +1 -0
  83. data/public/javascripts/erp_app/codemirror/mode/rpm/spec/index.html +1 -0
  84. data/public/javascripts/erp_app/codemirror/mode/rst/index.html +1 -0
  85. data/public/javascripts/erp_app/codemirror/mode/ruby/index.html +1 -0
  86. data/public/javascripts/erp_app/codemirror/mode/rust/index.html +1 -0
  87. data/public/javascripts/erp_app/codemirror/mode/scheme/index.html +1 -0
  88. data/public/javascripts/erp_app/codemirror/mode/scheme/scheme.js +1 -1
  89. data/public/javascripts/erp_app/codemirror/mode/shell/shell.js +2 -2
  90. data/public/javascripts/erp_app/codemirror/mode/sieve/LICENSE +23 -0
  91. data/public/javascripts/erp_app/codemirror/mode/sieve/index.html +81 -0
  92. data/public/javascripts/erp_app/codemirror/mode/sieve/sieve.js +156 -0
  93. data/public/javascripts/erp_app/codemirror/mode/smalltalk/index.html +1 -0
  94. data/public/javascripts/erp_app/codemirror/mode/smalltalk/smalltalk.js +2 -2
  95. data/public/javascripts/erp_app/codemirror/mode/smarty/index.html +1 -0
  96. data/public/javascripts/erp_app/codemirror/mode/smarty/smarty.js +2 -2
  97. data/public/javascripts/erp_app/codemirror/mode/sparql/index.html +1 -0
  98. data/public/javascripts/erp_app/codemirror/mode/stex/index.html +3 -0
  99. data/public/javascripts/erp_app/codemirror/mode/stex/stex.js +1 -1
  100. data/public/javascripts/erp_app/codemirror/mode/stex/test.js +343 -0
  101. data/public/javascripts/erp_app/codemirror/mode/tiddlywiki/index.html +1 -0
  102. data/public/javascripts/erp_app/codemirror/mode/tiki/index.html +1 -0
  103. data/public/javascripts/erp_app/codemirror/mode/tiki/tiki.js +4 -11
  104. data/public/javascripts/erp_app/codemirror/mode/vb/index.html +1 -0
  105. data/public/javascripts/erp_app/codemirror/mode/vb/vb.js +2 -2
  106. data/public/javascripts/erp_app/codemirror/mode/vbscript/index.html +1 -0
  107. data/public/javascripts/erp_app/codemirror/mode/velocity/index.html +1 -0
  108. data/public/javascripts/erp_app/codemirror/mode/velocity/velocity.js +1 -1
  109. data/public/javascripts/erp_app/codemirror/mode/verilog/index.html +1 -0
  110. data/public/javascripts/erp_app/codemirror/mode/verilog/verilog.js +1 -1
  111. data/public/javascripts/erp_app/codemirror/mode/xml/index.html +2 -1
  112. data/public/javascripts/erp_app/codemirror/mode/xml/xml.js +2 -10
  113. data/public/javascripts/erp_app/codemirror/mode/xquery/index.html +3 -2
  114. data/public/javascripts/erp_app/codemirror/mode/xquery/xquery.js +7 -4
  115. data/public/javascripts/erp_app/codemirror/mode/yaml/index.html +1 -0
  116. data/public/javascripts/erp_app/codemirror/package.json +15 -23
  117. data/public/javascripts/erp_app/codemirror/test/driver.js +109 -22
  118. data/public/javascripts/erp_app/codemirror/test/index.html +129 -16
  119. data/public/javascripts/erp_app/codemirror/test/lint/lint.js +120 -0
  120. data/public/javascripts/erp_app/codemirror/test/lint/parse-js.js +1372 -0
  121. data/public/javascripts/erp_app/codemirror/test/mode_test.css +0 -12
  122. data/public/javascripts/erp_app/codemirror/test/mode_test.js +66 -27
  123. data/public/javascripts/erp_app/codemirror/test/phantom_driver.js +30 -0
  124. data/public/javascripts/erp_app/codemirror/test/run.js +32 -0
  125. data/public/javascripts/erp_app/codemirror/test/test.js +213 -8
  126. data/public/javascripts/erp_app/shared/dynamic_editable_grid.js +33 -27
  127. data/public/javascripts/erp_app/shared/dynamic_editable_grid_loader_panel.js +2 -1
  128. metadata +15 -3
  129. data/public/javascripts/erp_app/codemirror/mode/stex/test.html +0 -263
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: MySQL mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: NTriples mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -27,7 +27,7 @@
27
27
  */
28
28
  CodeMirror.defineMode("ntriples", function() {
29
29
 
30
- Location = {
30
+ var Location = {
31
31
  PRE_SUBJECT : 0,
32
32
  WRITING_SUB_URI : 1,
33
33
  WRITING_BNODE_URI : 2,
@@ -87,8 +87,8 @@ CodeMirror.defineMode("ntriples", function() {
87
87
  currState.location=ret;
88
88
  }
89
89
 
90
- untilSpace = function(c) { return c != ' '; };
91
- untilEndURI = function(c) { return c != '>'; };
90
+ var untilSpace = function(c) { return c != ' '; };
91
+ var untilEndURI = function(c) { return c != '>'; };
92
92
  return {
93
93
  startState: function() {
94
94
  return {
@@ -114,7 +114,7 @@ CodeMirror.defineMode("ntriples", function() {
114
114
  }
115
115
  if(ch == '#') {
116
116
  var parsedAnchor = '';
117
- stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false});
117
+ stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
118
118
  state.anchors.push(parsedAnchor);
119
119
  return 'variable-2';
120
120
  }
@@ -103,7 +103,7 @@ CodeMirror.defineMode('ocaml', function(config) {
103
103
  }
104
104
 
105
105
  return {
106
- startState: function() {return {tokenize: tokenBase, commentLevel: 0}},
106
+ startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
107
107
  token: function(stream, state) {
108
108
  if (stream.eatSpace()) return null;
109
109
  return state.tokenize(stream, state);
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Pascal mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -26,7 +26,7 @@ CodeMirror.defineMode("pascal", function(config) {
26
26
  return tokenComment(stream, state);
27
27
  }
28
28
  if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
29
- return null
29
+ return null;
30
30
  }
31
31
  if (/\d/.test(ch)) {
32
32
  stream.eatWhile(/[\w\.]/);
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Perl mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -477,22 +477,22 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
477
477
  if(chain[++i]!==undefined){
478
478
  state.chain=chain[i];
479
479
  state.style=style;
480
- state.tail=tail}
480
+ state.tail=tail;}
481
481
  else if(tail)
482
482
  stream.eatWhile(tail);
483
483
  state.tokenize=tokenPerl;
484
- return style}
485
- e=!e&&c=="\\"}
486
- return style};
487
- return state.tokenize(stream,state)}
484
+ return style;}
485
+ e=!e&&c=="\\";}
486
+ return style;};
487
+ return state.tokenize(stream,state);}
488
488
 
489
489
  function tokenSOMETHING(stream,state,string){
490
490
  state.tokenize=function(stream,state){
491
491
  if(stream.string==string)
492
492
  state.tokenize=tokenPerl;
493
493
  stream.skipToEnd();
494
- return "string"};
495
- return state.tokenize(stream,state)}
494
+ return "string";};
495
+ return state.tokenize(stream,state);}
496
496
 
497
497
  function tokenPerl(stream,state){
498
498
  if(stream.eatSpace())
@@ -504,9 +504,9 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
504
504
  return 'number';
505
505
  if(stream.match(/^<<(?=\w)/)){ // NOTE: <<SOMETHING\n...\nSOMETHING\n
506
506
  stream.eatWhile(/\w/);
507
- return tokenSOMETHING(stream,state,stream.current().substr(2))}
507
+ return tokenSOMETHING(stream,state,stream.current().substr(2));}
508
508
  if(stream.sol()&&stream.match(/^\=item(?!\w)/)){// NOTE: \n=item...\n=cut\n
509
- return tokenSOMETHING(stream,state,'=cut')}
509
+ return tokenSOMETHING(stream,state,'=cut');}
510
510
  var ch=stream.next();
511
511
  if(ch=='"'||ch=="'"){ // NOTE: ' or " or <<'SOMETHING'\n...\nSOMETHING\n or <<"SOMETHING"\n...\nSOMETHING\n
512
512
  if(stream.prefix(3)=="<<"+ch){
@@ -515,8 +515,8 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
515
515
  var n=stream.current().substr(1);
516
516
  if(n&&stream.eat(ch))
517
517
  return tokenSOMETHING(stream,state,n);
518
- stream.pos=p}
519
- return tokenChain(stream,state,[ch],"string")}
518
+ stream.pos=p;}
519
+ return tokenChain(stream,state,[ch],"string");}
520
520
  if(ch=="q"){
521
521
  var c=stream.look(-2);
522
522
  if(!(c&&/\w/.test(c))){
@@ -525,100 +525,100 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
525
525
  c=stream.look(1);
526
526
  if(c=="("){
527
527
  stream.eatSuffix(2);
528
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers)}
528
+ return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
529
529
  if(c=="["){
530
530
  stream.eatSuffix(2);
531
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers)}
531
+ return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
532
532
  if(c=="{"){
533
533
  stream.eatSuffix(2);
534
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers)}
534
+ return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
535
535
  if(c=="<"){
536
536
  stream.eatSuffix(2);
537
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers)}
537
+ return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
538
538
  if(/[\^'"!~\/]/.test(c)){
539
539
  stream.eatSuffix(1);
540
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers)}}
540
+ return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
541
541
  else if(c=="q"){
542
542
  c=stream.look(1);
543
543
  if(c=="("){
544
544
  stream.eatSuffix(2);
545
- return tokenChain(stream,state,[")"],"string")}
545
+ return tokenChain(stream,state,[")"],"string");}
546
546
  if(c=="["){
547
547
  stream.eatSuffix(2);
548
- return tokenChain(stream,state,["]"],"string")}
548
+ return tokenChain(stream,state,["]"],"string");}
549
549
  if(c=="{"){
550
550
  stream.eatSuffix(2);
551
- return tokenChain(stream,state,["}"],"string")}
551
+ return tokenChain(stream,state,["}"],"string");}
552
552
  if(c=="<"){
553
553
  stream.eatSuffix(2);
554
- return tokenChain(stream,state,[">"],"string")}
554
+ return tokenChain(stream,state,[">"],"string");}
555
555
  if(/[\^'"!~\/]/.test(c)){
556
556
  stream.eatSuffix(1);
557
- return tokenChain(stream,state,[stream.eat(c)],"string")}}
557
+ return tokenChain(stream,state,[stream.eat(c)],"string");}}
558
558
  else if(c=="w"){
559
559
  c=stream.look(1);
560
560
  if(c=="("){
561
561
  stream.eatSuffix(2);
562
- return tokenChain(stream,state,[")"],"bracket")}
562
+ return tokenChain(stream,state,[")"],"bracket");}
563
563
  if(c=="["){
564
564
  stream.eatSuffix(2);
565
- return tokenChain(stream,state,["]"],"bracket")}
565
+ return tokenChain(stream,state,["]"],"bracket");}
566
566
  if(c=="{"){
567
567
  stream.eatSuffix(2);
568
- return tokenChain(stream,state,["}"],"bracket")}
568
+ return tokenChain(stream,state,["}"],"bracket");}
569
569
  if(c=="<"){
570
570
  stream.eatSuffix(2);
571
- return tokenChain(stream,state,[">"],"bracket")}
571
+ return tokenChain(stream,state,[">"],"bracket");}
572
572
  if(/[\^'"!~\/]/.test(c)){
573
573
  stream.eatSuffix(1);
574
- return tokenChain(stream,state,[stream.eat(c)],"bracket")}}
574
+ return tokenChain(stream,state,[stream.eat(c)],"bracket");}}
575
575
  else if(c=="r"){
576
576
  c=stream.look(1);
577
577
  if(c=="("){
578
578
  stream.eatSuffix(2);
579
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers)}
579
+ return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
580
580
  if(c=="["){
581
581
  stream.eatSuffix(2);
582
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers)}
582
+ return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
583
583
  if(c=="{"){
584
584
  stream.eatSuffix(2);
585
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers)}
585
+ return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
586
586
  if(c=="<"){
587
587
  stream.eatSuffix(2);
588
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers)}
588
+ return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
589
589
  if(/[\^'"!~\/]/.test(c)){
590
590
  stream.eatSuffix(1);
591
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers)}}
591
+ return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
592
592
  else if(/[\^'"!~\/(\[{<]/.test(c)){
593
593
  if(c=="("){
594
594
  stream.eatSuffix(1);
595
- return tokenChain(stream,state,[")"],"string")}
595
+ return tokenChain(stream,state,[")"],"string");}
596
596
  if(c=="["){
597
597
  stream.eatSuffix(1);
598
- return tokenChain(stream,state,["]"],"string")}
598
+ return tokenChain(stream,state,["]"],"string");}
599
599
  if(c=="{"){
600
600
  stream.eatSuffix(1);
601
- return tokenChain(stream,state,["}"],"string")}
601
+ return tokenChain(stream,state,["}"],"string");}
602
602
  if(c=="<"){
603
603
  stream.eatSuffix(1);
604
- return tokenChain(stream,state,[">"],"string")}
604
+ return tokenChain(stream,state,[">"],"string");}
605
605
  if(/[\^'"!~\/]/.test(c)){
606
- return tokenChain(stream,state,[stream.eat(c)],"string")}}}}
606
+ return tokenChain(stream,state,[stream.eat(c)],"string");}}}}
607
607
  if(ch=="m"){
608
608
  var c=stream.look(-2);
609
609
  if(!(c&&/\w/.test(c))){
610
610
  c=stream.eat(/[(\[{<\^'"!~\/]/);
611
611
  if(c){
612
612
  if(/[\^'"!~\/]/.test(c)){
613
- return tokenChain(stream,state,[c],RXstyle,RXmodifiers)}
613
+ return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}
614
614
  if(c=="("){
615
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers)}
615
+ return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
616
616
  if(c=="["){
617
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers)}
617
+ return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
618
618
  if(c=="{"){
619
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers)}
619
+ return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
620
620
  if(c=="<"){
621
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers)}}}}
621
+ return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}}
622
622
  if(ch=="s"){
623
623
  var c=/[\/>\]})\w]/.test(stream.look(-2));
624
624
  if(!c){
@@ -632,7 +632,7 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
632
632
  return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
633
633
  if(c=="(")
634
634
  return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
635
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}
635
+ return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
636
636
  if(ch=="y"){
637
637
  var c=/[\/>\]})\w]/.test(stream.look(-2));
638
638
  if(!c){
@@ -646,7 +646,7 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
646
646
  return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
647
647
  if(c=="(")
648
648
  return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
649
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}
649
+ return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
650
650
  if(ch=="t"){
651
651
  var c=/[\/>\]})\w]/.test(stream.look(-2));
652
652
  if(!c){
@@ -661,65 +661,65 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
661
661
  return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
662
662
  if(c=="(")
663
663
  return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
664
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers)}}}}
664
+ return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}
665
665
  if(ch=="`"){
666
- return tokenChain(stream,state,[ch],"variable-2")}
666
+ return tokenChain(stream,state,[ch],"variable-2");}
667
667
  if(ch=="/"){
668
668
  if(!/~\s*$/.test(stream.prefix()))
669
669
  return "operator";
670
670
  else
671
- return tokenChain(stream,state,[ch],RXstyle,RXmodifiers)}
671
+ return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}
672
672
  if(ch=="$"){
673
673
  var p=stream.pos;
674
674
  if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}"))
675
675
  return "variable-2";
676
676
  else
677
- stream.pos=p}
677
+ stream.pos=p;}
678
678
  if(/[$@%]/.test(ch)){
679
679
  var p=stream.pos;
680
680
  if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(stream.look(-2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){
681
681
  var c=stream.current();
682
682
  if(PERL[c])
683
- return "variable-2"}
684
- stream.pos=p}
683
+ return "variable-2";}
684
+ stream.pos=p;}
685
685
  if(/[$@%&]/.test(ch)){
686
686
  if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){
687
687
  var c=stream.current();
688
688
  if(PERL[c])
689
689
  return "variable-2";
690
690
  else
691
- return "variable"}}
691
+ return "variable";}}
692
692
  if(ch=="#"){
693
693
  if(stream.look(-2)!="$"){
694
694
  stream.skipToEnd();
695
- return "comment"}}
695
+ return "comment";}}
696
696
  if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){
697
697
  var p=stream.pos;
698
698
  stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
699
699
  if(PERL[stream.current()])
700
700
  return "operator";
701
701
  else
702
- stream.pos=p}
702
+ stream.pos=p;}
703
703
  if(ch=="_"){
704
704
  if(stream.pos==1){
705
705
  if(stream.suffix(6)=="_END__"){
706
- return tokenChain(stream,state,['\0'],"comment")}
706
+ return tokenChain(stream,state,['\0'],"comment");}
707
707
  else if(stream.suffix(7)=="_DATA__"){
708
- return tokenChain(stream,state,['\0'],"variable-2")}
708
+ return tokenChain(stream,state,['\0'],"variable-2");}
709
709
  else if(stream.suffix(7)=="_C__"){
710
- return tokenChain(stream,state,['\0'],"string")}}}
710
+ return tokenChain(stream,state,['\0'],"string");}}}
711
711
  if(/\w/.test(ch)){
712
712
  var p=stream.pos;
713
713
  if(stream.look(-2)=="{"&&(stream.look(0)=="}"||stream.eatWhile(/\w/)&&stream.look(0)=="}"))
714
714
  return "string";
715
715
  else
716
- stream.pos=p}
716
+ stream.pos=p;}
717
717
  if(/[A-Z]/.test(ch)){
718
718
  var l=stream.look(-2);
719
719
  var p=stream.pos;
720
720
  stream.eatWhile(/[A-Z_]/);
721
721
  if(/[\da-z]/.test(stream.look(0))){
722
- stream.pos=p}
722
+ stream.pos=p;}
723
723
  else{
724
724
  var c=PERL[stream.current()];
725
725
  if(!c)
@@ -738,9 +738,9 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
738
738
  else if(c==5)
739
739
  return "variable-2";
740
740
  else
741
- return "meta"}
741
+ return "meta";}
742
742
  else
743
- return "meta"}}
743
+ return "meta";}}
744
744
  if(/[a-zA-Z_]/.test(ch)){
745
745
  var l=stream.look(-2);
746
746
  stream.eatWhile(/\w/);
@@ -761,10 +761,10 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
761
761
  else if(c==5)
762
762
  return "variable-2";
763
763
  else
764
- return "meta"}
764
+ return "meta";}
765
765
  else
766
- return "meta"}
767
- return null}
766
+ return "meta";}
767
+ return null;}
768
768
 
769
769
  return{
770
770
  startState:function(){
@@ -772,37 +772,37 @@ CodeMirror.defineMode("perl",function(config,parserConfig){
772
772
  tokenize:tokenPerl,
773
773
  chain:null,
774
774
  style:null,
775
- tail:null}},
775
+ tail:null};},
776
776
  token:function(stream,state){
777
- return (state.tokenize||tokenPerl)(stream,state)},
778
- electricChars:"{}"}});
777
+ return (state.tokenize||tokenPerl)(stream,state);},
778
+ electricChars:"{}"};});
779
779
 
780
780
  CodeMirror.defineMIME("text/x-perl", "perl");
781
781
 
782
782
  // it's like "peek", but need for look-ahead or look-behind if index < 0
783
783
  CodeMirror.StringStream.prototype.look=function(c){
784
- return this.string.charAt(this.pos+(c||0))};
784
+ return this.string.charAt(this.pos+(c||0));};
785
785
 
786
786
  // return a part of prefix of current stream from current position
787
787
  CodeMirror.StringStream.prototype.prefix=function(c){
788
788
  if(c){
789
789
  var x=this.pos-c;
790
- return this.string.substr((x>=0?x:0),c)}
790
+ return this.string.substr((x>=0?x:0),c);}
791
791
  else{
792
- return this.string.substr(0,this.pos-1)}};
792
+ return this.string.substr(0,this.pos-1);}};
793
793
 
794
794
  // return a part of suffix of current stream from current position
795
795
  CodeMirror.StringStream.prototype.suffix=function(c){
796
796
  var y=this.string.length;
797
797
  var x=y-this.pos+1;
798
- return this.string.substr(this.pos,(c&&c<y?c:x))};
798
+ return this.string.substr(this.pos,(c&&c<y?c:x));};
799
799
 
800
800
  // return a part of suffix of current stream from current position and change current position
801
801
  CodeMirror.StringStream.prototype.nsuffix=function(c){
802
802
  var p=this.pos;
803
803
  var l=c||(this.string.length-this.pos+1);
804
804
  this.pos+=l;
805
- return this.string.substr(p,l)};
805
+ return this.string.substr(p,l);};
806
806
 
807
807
  // eating and vomiting a part of stream from current position
808
808
  CodeMirror.StringStream.prototype.eatSuffix=function(c){
@@ -813,4 +813,4 @@ CodeMirror.StringStream.prototype.eatSuffix=function(c){
813
813
  else if(x>=(y=this.string.length-1))
814
814
  this.pos=y;
815
815
  else
816
- this.pos=x};
816
+ this.pos=x;};
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: PHP mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -9,7 +9,7 @@
9
9
  if (stream.match(delim)) state.tokenize = null;
10
10
  else stream.skipToEnd();
11
11
  return "string";
12
- }
12
+ };
13
13
  }
14
14
  var phpConfig = {
15
15
  name: "clike",
@@ -56,14 +56,13 @@
56
56
  var phpMode = CodeMirror.getMode(config, phpConfig);
57
57
 
58
58
  function dispatch(stream, state) { // TODO open PHP inside text/css
59
- var isPHP = state.mode == "php";
59
+ var isPHP = state.curMode == phpMode;
60
60
  if (stream.sol() && state.pending != '"') state.pending = null;
61
61
  if (state.curMode == htmlMode) {
62
62
  if (stream.match(/^<\?\w*/)) {
63
63
  state.curMode = phpMode;
64
64
  state.curState = state.php;
65
65
  state.curClose = "?>";
66
- state.mode = "php";
67
66
  return "meta";
68
67
  }
69
68
  if (state.pending == '"') {
@@ -86,13 +85,11 @@
86
85
  state.curMode = jsMode;
87
86
  state.curState = jsMode.startState(htmlMode.indent(state.curState, ""));
88
87
  state.curClose = /^<\/\s*script\s*>/i;
89
- state.mode = "javascript";
90
88
  }
91
89
  else if (/^style$/i.test(state.curState.context.tagName)) {
92
90
  state.curMode = cssMode;
93
91
  state.curState = cssMode.startState(htmlMode.indent(state.curState, ""));
94
92
  state.curClose = /^<\/\s*style\s*>/i;
95
- state.mode = "css";
96
93
  }
97
94
  }
98
95
  return style;
@@ -101,7 +98,6 @@
101
98
  state.curMode = htmlMode;
102
99
  state.curState = state.html;
103
100
  state.curClose = null;
104
- state.mode = "html";
105
101
  if (isPHP) return "meta";
106
102
  else return dispatch(stream, state);
107
103
  } else {
@@ -118,7 +114,7 @@
118
114
  curState: parserConfig.startOpen ? phpMode.startState() : html,
119
115
  curClose: parserConfig.startOpen ? /^\?>/ : null,
120
116
  mode: parserConfig.startOpen ? "php" : "html",
121
- pending: null}
117
+ pending: null};
122
118
  },
123
119
 
124
120
  copyState: function(state) {
@@ -141,8 +137,10 @@
141
137
  return state.curMode.indent(state.curState, textAfter);
142
138
  },
143
139
 
144
- electricChars: "/{}:"
145
- }
140
+ electricChars: "/{}:",
141
+
142
+ innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
143
+ };
146
144
  }, "xml", "clike", "javascript", "css");
147
145
  CodeMirror.defineMIME("application/x-httpd-php", "php");
148
146
  CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Pig Latin mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -107,11 +107,11 @@ CodeMirror.defineMode("pig", function(config, parserConfig) {
107
107
  // is it one of the builtin functions?
108
108
  if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase()))
109
109
  {
110
- return ("keyword", "variable-2")
110
+ return ("keyword", "variable-2");
111
111
  }
112
112
  // is it one of the listed types?
113
113
  if (types && types.propertyIsEnumerable(stream.current().toUpperCase()))
114
- return ("keyword", "variable-3")
114
+ return ("keyword", "variable-3");
115
115
  // default is a 'variable'
116
116
  return ret("variable", "pig-word");
117
117
  }
@@ -161,7 +161,7 @@ CodeMirror.defineMode("pig", function(config, parserConfig) {
161
161
  + "NEQ MATCHES TRUE FALSE ";
162
162
 
163
163
  // data types
164
- var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP "
164
+ var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ";
165
165
 
166
166
  CodeMirror.defineMIME("text/x-pig", {
167
167
  name: "pig",
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Oracle PL/SQL mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Properties files mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Python mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -227,7 +227,7 @@ CodeMirror.defineMode("python", function(conf, parserConf) {
227
227
  while (state.scopes[0].offset !== _indent) {
228
228
  state.scopes.shift();
229
229
  }
230
- return false
230
+ return false;
231
231
  } else {
232
232
  if (type === 'py') {
233
233
  state.scopes[0].offset = stream.indentation();
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: R mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: RPM changes mode</title>
5
6
  <link rel="stylesheet" href="../../../lib/codemirror.css">
6
7
  <script src="../../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: RPM spec mode</title>
5
6
  <link rel="stylesheet" href="../../../lib/codemirror.css">
6
7
  <script src="../../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: reStructuredText mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Ruby mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Rust mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>
@@ -1,6 +1,7 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ <meta charset="utf-8">
4
5
  <title>CodeMirror: Scheme mode</title>
5
6
  <link rel="stylesheet" href="../../lib/codemirror.css">
6
7
  <script src="../../lib/codemirror.js"></script>