Showing with 5,276 additions and 3,592 deletions.
  1. +244 −0 AUTHORS
  2. +1 −1 LICENSE
  3. +1 −1 addon/{edit → comment}/continuecomment.js
  4. +6 −0 addon/display/fullscreen.css
  5. +30 −0 addon/display/fullscreen.js
  6. +3 −3 addon/fold/brace-fold.js
  7. +40 −0 addon/fold/comment-fold.js
  8. +7 −10 addon/hint/show-hint.js
  9. +34 −0 addon/scroll/scrollpastend.js
  10. +4 −1 addon/search/match-highlighter.js
  11. +6 −0 bin/authors.sh
  12. +1 −1 bower.json
  13. +25 −17 demo/activeline.html
  14. +27 −17 demo/anywordhint.html
  15. +31 −18 demo/bidi.html
  16. +22 −23 demo/btree.html
  17. +27 −16 demo/buffers.html
  18. +25 −16 demo/changemode.html
  19. +27 −27 demo/closebrackets.html
  20. +29 −26 demo/closetag.html
  21. +31 −21 demo/complete.html
  22. +31 −22 demo/emacs.html
  23. +37 −27 demo/folding.html
  24. +34 −51 demo/fullscreen.html
  25. +33 −23 demo/html5complete.html
  26. +25 −16 demo/indentwrap.html
  27. +31 −20 demo/lint.html
  28. +24 −15 demo/loadmode.html
  29. +25 −16 demo/marker.html
  30. +25 −16 demo/markselection.html
  31. +25 −16 demo/matchhighlighter.html
  32. +28 −17 demo/matchtags.html
  33. +28 −13 demo/merge.html
  34. +25 −16 demo/multiplex.html
  35. +26 −17 demo/mustache.html
  36. +24 −15 demo/placeholder.html
  37. +29 −17 demo/preview.html
  38. +24 −15 demo/resize.html
  39. +26 −14 demo/runmode.html
  40. +28 −19 demo/search.html
  41. +22 −10 demo/spanaffectswrapping_shim.html
  42. +41 −35 demo/tern.html
  43. +58 −39 demo/theme.html
  44. +24 −15 demo/trailingspace.html
  45. +27 −18 demo/variableheight.html
  46. +28 −19 demo/vim.html
  47. +24 −15 demo/visibletabs.html
  48. +26 −15 demo/widget.html
  49. +28 −18 demo/xmlcomplete.html
  50. +42 −0 doc/activebookmark.js
  51. BIN doc/baboon.png
  52. +0 −153 doc/baboon_vector.svg
  53. +25 −20 doc/compress.html
  54. +167 −113 doc/docs.css
  55. +53 −55 doc/internals.html
  56. BIN doc/logo.png
  57. +147 −0 doc/logo.svg
  58. +97 −83 doc/manual.html
  59. +0 −100 doc/modes.html
  60. +22 −17 doc/realworld.html
  61. +285 −77 doc/{oldrelease.html → releases.html}
  62. +21 −20 doc/reporting.html
  63. +23 −25 doc/upgrade_v2.2.html
  64. +69 −66 doc/upgrade_v3.html
  65. +172 −464 index.html
  66. +5 −0 keymap/vim.js
  67. +1 −0 lib/codemirror.css
  68. +58 −28 lib/codemirror.js
  69. +26 −15 mode/apl/index.html
  70. +27 −15 mode/asterisk/index.html
  71. +111 −19 mode/clike/index.html
  72. +27 −27 mode/clike/scala.html
  73. +27 −15 mode/clojure/index.html
  74. +50 −35 mode/cobol/index.html
  75. +0 −22 mode/coffeescript/LICENSE
  76. +27 −15 mode/coffeescript/index.html
  77. +27 −15 mode/commonlisp/index.html
  78. +21 −19 mode/css/css.js
  79. +27 −15 mode/css/index.html
  80. +27 −15 mode/css/scss.html
  81. +26 −15 mode/d/index.html
  82. +27 −15 mode/diff/index.html
  83. +28 −15 mode/ecl/index.html
  84. +122 −102 mode/erlang/erlang.js
  85. +28 −17 mode/erlang/index.html
  86. +27 −16 mode/gas/index.html
  87. +32 −24 mode/gfm/index.html
  88. +27 −16 mode/go/index.html
  89. +26 −15 mode/groovy/index.html
  90. +31 −19 mode/haml/index.html
  91. +27 −16 mode/haskell/index.html
  92. +27 −14 mode/haxe/index.html
  93. +29 −18 mode/htmlembedded/index.html
  94. +31 −19 mode/htmlmixed/index.html
  95. +27 −14 mode/http/index.html
  96. +106 −0 mode/index.html
  97. +27 −15 mode/jade/index.html
  98. +30 −17 mode/javascript/index.html
  99. +3 −2 mode/javascript/javascript.js
  100. +27 −14 mode/javascript/typescript.html
  101. +27 −15 mode/jinja2/index.html
  102. +29 −17 mode/less/index.html
  103. +0 −23 mode/livescript/LICENSE
  104. +28 −15 mode/livescript/index.html
  105. +29 −17 mode/lua/index.html
  106. +28 −18 mode/markdown/index.html
  107. +1 −1 mode/meta.js
  108. +28 −16 mode/mirc/index.html
  109. +27 −13 mode/nginx/index.html
  110. +27 −15 mode/ntriples/index.html
  111. +22 −7 mode/ocaml/index.html
  112. +0 −7 mode/pascal/LICENSE
  113. +27 −14 mode/pascal/index.html
  114. +0 −19 mode/perl/LICENSE
  115. +27 −14 mode/perl/index.html
  116. +31 −20 mode/php/index.html
  117. +25 −12 mode/pig/index.html
  118. +27 −15 mode/properties/index.html
  119. +0 −21 mode/python/LICENSE.txt
  120. +28 −16 mode/python/index.html
  121. +12 −4 mode/python/python.js
  122. +28 −15 mode/q/index.html
  123. +0 −24 mode/r/LICENSE
  124. +27 −15 mode/r/index.html
  125. +24 −10 mode/rpm/changes/index.html
  126. +24 −9 mode/rpm/spec/index.html
  127. +0 −21 mode/rst/LICENSE.txt
  128. +25 −15 mode/rst/index.html
  129. +20 −21 mode/rst/rst.js
  130. +0 −24 mode/ruby/LICENSE
  131. +28 −16 mode/ruby/index.html
  132. +27 −14 mode/rust/index.html
  133. +28 −16 mode/sass/index.html
  134. +27 −15 mode/scheme/index.html
  135. +22 −7 mode/shell/index.html
  136. +0 −19 mode/sieve/LICENSE
  137. +27 −15 mode/sieve/index.html
  138. +26 −15 mode/smalltalk/index.html
  139. +27 −17 mode/smarty/index.html
  140. +29 −22 mode/smartymixed/index.html
  141. +28 −16 mode/sparql/index.html
  142. +43 −37 mode/sql/index.html
  143. +27 −15 mode/stex/index.html
  144. +29 −15 mode/tcl/index.html
  145. +29 −16 mode/tiddlywiki/index.html
  146. +29 −15 mode/tiki/index.html
  147. +27 −15 mode/turtle/index.html
  148. +0 −21 mode/vb/LICENSE.txt
  149. +32 −17 mode/vb/index.html
  150. +27 −15 mode/vbscript/index.html
  151. +32 −16 mode/velocity/index.html
  152. +54 −12 mode/velocity/velocity.js
  153. +25 −14 mode/verilog/index.html
  154. +27 −15 mode/xml/index.html
  155. +1 −1 mode/xml/xml.js
  156. +0 −20 mode/xquery/LICENSE
  157. +30 −41 mode/xquery/index.html
  158. +5 −1 mode/xquery/xquery.js
  159. +27 −15 mode/yaml/index.html
  160. +8 −8 mode/yaml/yaml.js
  161. +27 −14 mode/z80/index.html
  162. +1 −1 package.json
  163. +1 −1 test/driver.js
  164. +59 −46 test/index.html
  165. +29 −0 test/test.js
  166. +1 −0 theme/3024-day.css
  167. +1 −0 theme/3024-night.css
  168. +1 −1 theme/ambiance.css
  169. +1 −0 theme/base16-dark.css
  170. +1 −0 theme/base16-light.css
  171. +3 −0 theme/blackboard.css
  172. +3 −0 theme/cobalt.css
  173. +2 −4 theme/eclipse.css
  174. +3 −0 theme/elegant.css
  175. +11 −2 theme/erlang-dark.css
  176. +3 −0 theme/lesser-dark.css
  177. +2 −2 theme/midnight.css
  178. +1 −0 theme/monokai.css
  179. +3 −0 theme/neat.css
  180. +3 −0 theme/night.css
  181. +34 −0 theme/paraiso-dark.css
  182. +34 −0 theme/paraiso-light.css
  183. +2 −0 theme/rubyblue.css
  184. +2 −7 theme/solarized.css
  185. +26 −0 theme/the-matrix.css
  186. +1 −0 theme/tomorrow-night-eighties.css
  187. +2 −0 theme/twilight.css
  188. +3 −0 theme/vibrant-ink.css
  189. +4 −1 theme/xq-dark.css
  190. +1 −1 theme/xq-light.css
244 changes: 244 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
List of CodeMirror contributors. Updated before every release.

4r2r
Aaron Brooks
Adam King
adanlobato
Adán Lobato
aeroson
Ahmad Amireh
Ahmad M. Zawawi
ahoward
Akeksandr Motsjonov
Albert Xing
Alexander Pavlov
Alexander Schepanovski
alexey-k
Alex Piggott
Amy
Ananya Sen
Andre von Houck
Andrey Lushnikov
Andy Kimball
Andy Li
angelozerr
angelo.zerr@gmail.com
Ankit Ahuja
Ansel Santosa
Anthony Grimes
areos
Atul Bhouraskar
Aurelian Oancea
Bastian Müller
benbro
Benjamin DeCoste
Ben Keen
boomyjee
borawjm
Brandon Frohs
Brian Sletten
Bruce Mitchener
Chandra Sekhar Pydi
Charles Skelton
Chris Coyier
Chris Granger
Chris Morgan
Christopher Brown
CodeAnimal
ComFreek
dagsta
Dan Heberden
Daniel, Dao Quang Minh
Daniel Faust
Daniel Huigens
Daniel Neel
Daniel Parnell
Danny Yoo
David Mignot
David Pathakjee
deebugger
Deep Thought
Dominator008
Domizio Demichelis
Drew Bratcher
Drew Hintz
Drew Khoury
Dror BG
duralog
edsharp
ekhaled
Eric Allam
eustas
Fauntleroy
fbuchinger
feizhang365
Felipe Lalanne
Felix Raab
Filip Noetzel
flack
Ford_Lawnmower
Gabriel Nahmias
galambalazs
Gautam Mehta
Glenn Ruehle
Golevka
Gordon Smith
greengiant
Guillaume Massé
Hans Engel
Hardest
Hasan Karahan
Hocdoc
Ian Beck
Ian Wehrman
Ian Wetherbee
Ice White
ICHIKAWA, Yuji
Ingo Richter
Irakli Gozalishvili
Ivan Kurnosov
Jacob Lee
Jakub Vrana
James Campos
James Thorne
Jamie Hill
Jan Jongboom
jankeromnes
Jan Keromnes
Jan T. Sott
Jason
Jason Grout
Jason Johnston
Jason San Jose
Jason Siefken
Jean Boussier
jeffkenton
Jeff Pickhardt
jem (graphite)
Jochen Berger
John Connor
John Lees-Miller
John Snelson
jongalloway
Joost-Wim Boekesteijn
Joseph Pecoraro
Joshua Newman
jots
Juan Benavides Romero
Jucovschi Constantin
jwallers@gmail.com
kaniga
Ken Newman
Ken Rockot
Kevin Sawicki
Klaus Silveira
Koh Zi Han, Cliff
komakino
Konstantin Lopuhin
koops
ks-ifware
Lanny
leaf corcoran
Leonya Khachaturov
Liam Newman
List of contributors. Updated before every release.
LM
Lorenzo Stoakes
lynschinzer
Maksim Lin
Maksym Taran
Marat Dreizin
Marco Aurélio
Marijn Haverbeke
Mario Pietsch
Mark Lentczner
Mason Malone
Mateusz Paprocki
mats cronqvist
Matthew Beale
Matthias BUSSONNIER
Matt McDonald
Matt Pass
Matt Sacks
Maximilian Hils
Max Kirsch
mbarkhau
Metatheos
Micah Dubinko
Michael Lehenbauer
Michael Zhou
Mighty Guava
Miguel Castillo
Mike
Mike Brevoort
Mike Diaz
Mike Ivanov
Mike Kadin
MinRK
misfo
mps
Narciso Jaramillo
Nathan Williams
nerbert
nguillaumin
Niels van Groningen
Nikita Beloglazov
Nikita Vasilyev
nlwillia
pablo
Page
Patrick Strawderman
Paul Garvin
Paul Ivanov
Pavel Feldman
Paweł Bartkiewicz
peteguhl
peterkroon
Peter Kroon
prasanthj
Prasanth J
Rahul
Randy Edmunds
Richard Z.H. Wang
robertop23
Robert Plummer
Ruslan Osmanov
sabaca
Samuel Ainsworth
sandeepshetty
santec
Sascha Peilicke
satchmorun
sathyamoorthi
SCLINIC\jdecker
shaund
shaun gilchrist
Shmuel Englard
sonson
spastorelli
Stas Kobzar
Stefan Borsje
Steffen Beyer
Steve O'Hara
Tarmil
tfjgeorge
Thaddee Tyl
think
Thomas Dvornik
Thomas Schmid
Tim Baumann
Timothy Farrell
Timothy Hatcher
Tomas Varaneckas
Tom Erik Støwer
Tom MacWright
Tony Jian
Vestimir Markov
vf
Volker Mische
William Jamieson
Wojtek Ptak
Xavier Mendez
Yunchi Luo
Yuvi Panda
Zachary Dremann
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com>
Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> and others

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode;
var space;

if (token.type == "comment" && mode.blockCommentStart) {
if (token.type == "comment" && mode.blockCommentStart && mode.blockCommentContinue) {
var end = token.string.indexOf(mode.blockCommentEnd);
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length) {
Expand Down
6 changes: 6 additions & 0 deletions addon/display/fullscreen.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.CodeMirror-fullscreen {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
height: auto;
z-index: 9999;
}
30 changes: 30 additions & 0 deletions addon/display/fullscreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
(function() {
"use strict";

CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {
if (old == CodeMirror.Init) old = false;
if (!old == !val) return;
if (val) setFullscreen(cm);
else setNormal(cm);
});

function setFullscreen(cm) {
var wrap = cm.getWrapperElement();
cm.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset,
width: wrap.style.width, height: wrap.style.height};
wrap.style.width = wrap.style.height = "";
wrap.className += " CodeMirror-fullscreen";
document.documentElement.style.overflow = "hidden";
cm.refresh();
}

function setNormal(cm) {
var wrap = cm.getWrapperElement();
wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, "");
document.documentElement.style.overflow = "";
var info = cm.state.fullScreenRestore;
wrap.style.width = info.width; wrap.style.height = info.height;
window.scrollTo(info.scrollLeft, info.scrollTop);
cm.refresh();
}
})();
6 changes: 3 additions & 3 deletions addon/fold/brace-fold.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) {

function findOpening(openCh) {
for (var at = start.ch, pass = 0;;) {
var found = lineText.lastIndexOf(openCh, at - 1);
var found = at <= 0 ? -1 : lineText.lastIndexOf(openCh, at - 1);
if (found == -1) {
if (pass == 1) break;
pass = 1;
at = lineText.length;
continue;
}
if (pass == 1 && found < start.ch) break;
tokenType = cm.getTokenAt(CodeMirror.Pos(line, found + 1)).type;
tokenType = cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1));
if (!/^(comment|string)/.test(tokenType)) return found + 1;
at = found - 1;
}
Expand All @@ -34,7 +34,7 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) {
if (nextClose < 0) nextClose = text.length;
pos = Math.min(nextOpen, nextClose);
if (pos == text.length) break;
if (cm.getTokenAt(CodeMirror.Pos(i, pos + 1)).type == tokenType) {
if (cm.getTokenTypeAt(CodeMirror.Pos(i, pos + 1)) == tokenType) {
if (pos == nextOpen) ++count;
else if (!--count) { end = i; endCh = pos; break outer; }
}
Expand Down
40 changes: 40 additions & 0 deletions addon/fold/comment-fold.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
CodeMirror.registerHelper("fold", "comment", function(cm, start) {
var mode = cm.getModeAt(start), startToken = mode.blockCommentStart, endToken = mode.blockCommentEnd;
if (!startToken || !endToken) return;
var line = start.line, lineText = cm.getLine(line);

var startCh;
for (var at = start.ch, pass = 0;;) {
var found = at <= 0 ? -1 : lineText.lastIndexOf(startToken, at - 1);
if (found == -1) {
if (pass == 1) return;
pass = 1;
at = lineText.length;
continue;
}
if (pass == 1 && found < start.ch) return;
if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) {
startCh = found + startToken.length;
break;
}
at = found - 1;
}

var depth = 1, lastLine = cm.lastLine(), end, endCh;
outer: for (var i = line; i <= lastLine; ++i) {
var text = cm.getLine(i), pos = i == line ? startCh : 0;
for (;;) {
var nextOpen = text.indexOf(startToken, pos), nextClose = text.indexOf(endToken, pos);
if (nextOpen < 0) nextOpen = text.length;
if (nextClose < 0) nextClose = text.length;
pos = Math.min(nextOpen, nextClose);
if (pos == text.length) break;
if (pos == nextOpen) ++depth;
else if (!--depth) { end = i; endCh = pos; break outer; }
++pos;
}
}
if (end == null || line == end && endCh == startCh) return;
return {from: CodeMirror.Pos(line, startCh),
to: CodeMirror.Pos(end, endCh)};
});
Loading