diff --git a/assets/vendor/codemirror/AUTHORS b/assets/vendor/codemirror/AUTHORS old mode 100755 new mode 100644 index 1e3ece23e..2ac995f95 --- a/assets/vendor/codemirror/AUTHORS +++ b/assets/vendor/codemirror/AUTHORS @@ -6,14 +6,18 @@ Abdelouahab Abe Fettig Adam Ahmed Adam King +Adam Particka adanlobato Adán Lobato Adrian Aichner +Adrian Heine +Adrien Bertrand aeroson Ahmad Amireh Ahmad M. Zawawi ahoward Akeksandr Motsjonov +Alasdair Smith Alberto González Palomo Alberto Pose Albert Xing @@ -26,7 +30,9 @@ alexey-k Alex Piggott Aliaksei Chapyzhenka Allen Sarkisyan +Ami Fischman Amin Shali +Amin Ullah Khan amshali@google.com Amsul amuntean @@ -41,9 +47,11 @@ Andrea G Andreas Reischuck Andres Taylor Andre von Houck +Andrew Cheng Andrey Fedorov Andrey Klyuchnikov Andrey Lushnikov +Andrey Shchekin Andy Joslin Andy Kimball Andy Li @@ -58,12 +66,18 @@ anthonygego Anthony Gégo Anthony Grimes Anton Kovalyov +Apollo Zhu AQNOUCH Mohammed areos +Arnab Bose +Arthur Müller +Arun Narasani as3boyan +atelierbram AtomicPages LLC Atul Bhouraskar Aurelian Oancea +Axel Lewenhaupt Barret Rennie Basarat Ali Syed Bastian Müller @@ -73,8 +87,12 @@ benbro Beni Cherniavsky-Paskin Benjamin DeCoste Ben Keen +Ben Miller +Ben Mosher Bernhard Sirlinger Bert Chang +Bharad +BigBlueHat Billy Moon binny B Krishna Chaitanya @@ -88,25 +106,35 @@ Brandon Wamboldt Brett Zamir Brian Grinstead Brian Sletten +brrd Bruce Mitchener +Bryan Massoth Caitlin Potter Calin Barbat +callodacity +Camilo Roca +Chad Jolly Chandra Sekhar Pydi Charles Skelton Cheah Chu Yeow Chris Coyier +Chris Ford Chris Granger Chris Houseknecht Chris Lohfink Chris Morgan +Chris Smith Christian Oyarzun Christian Petrov Christopher Brown +Christopher Kramer Christopher Mitchell Christopher Pfohl +Chunliang Lyu ciaranj CodeAnimal coderaiser +Cole R Lawrence ComFreek Curtis Gagliardi dagsta @@ -118,6 +146,7 @@ Daniel, Dao Quang Minh Daniele Di Sarli Daniel Faust Daniel Huigens +Daniel Kesler Daniel KJ Daniel Neel Daniel Parnell @@ -127,12 +156,16 @@ Darius Roberts Dave Brondsema Dave Myers David Barnett +David H. Bronke David Mignot David Pathakjee David Vázquez +David Whittington deebugger Deep Thought +Devin Abbott Devon Carew +Dick Choi dignifiedquire Dimage Sapelkin Dmitry Kiselyov @@ -143,15 +176,19 @@ Doug Wikle Drew Bratcher Drew Hintz Drew Khoury +Drini Cami Dror BG duralog eborden edsharp ekhaled Elisée +Emmanuel Schanzer Enam Mijbah Noor Eric Allam +Erik Welander eustas +Fabien Dubosson Fabien O'Carroll Fabio Zendhi Nagao Faiza Alsaied @@ -160,8 +197,11 @@ fbuchinger feizhang365 Felipe Lalanne Felix Raab +ficristo Filip Noetzel +Filip Stollár flack +Florian Felten ForbesLindesay Forbes Lindesay Ford_Lawnmower @@ -171,30 +211,41 @@ Gabriel Gheorghian Gabriel Horner Gabriel Nahmias galambalazs +Gary Sheng Gautam Mehta +Gavin Douglas gekkoe +Geordie Hall +geowarin Gerard Braad Gergely Hegykozi Giovanni Calò +Glebov Boris Glenn Jorde Glenn Ruehle Golevka +Google Inc. Gordon Smith Grant Skinner greengiant Gregory Koberger +Grzegorz Mazur Guillaume Massé Guillaume Massé +guraga Gustavo Rodrigues Hakan Tunc Hans Engel Hardest +Harshvardhan Gupta Hasan Karahan Hector Oswaldo Caballero +Hendrik Wallbaum Herculano Campos Hiroyuki Makino hitsthings Hocdoc +Hugues Malphettes Ian Beck Ian Dickinson Ian Wehrman @@ -208,18 +259,24 @@ Irakli Gozalishvili Ivan Kurnosov Ivoah Jacob Lee +Jake Peyser Jakob Miland Jakub Vrana Jakub Vrána James Campos +James Howard James Thorne Jamie Hill +Jamie Morris Jan Jongboom jankeromnes Jan Keromnes Jan Odvarko +Jan Schär Jan T. Sott +Jared Dean Jared Forsyth +Jared Jacobs Jason Jason Barnabe Jason Grout @@ -229,24 +286,37 @@ Jason Siefken Jaydeep Solanki Jean Boussier Jeff Blaisdell +Jeff Jenkins jeffkenton Jeff Pickhardt jem (graphite) Jeremy Parmenter +Jim +Jim Avery +JobJob +jochenberger Jochen Berger +Joel Einbinder +joelpinheiro Johan Ask John Connor +John-David Dalton John Engler John Lees-Miller John Snelson John Van Der Loo +Jon Ander Peñalba Jonas Döbertin Jonathan Malmaud +Jon Gacnik jongalloway Jon Malmaud Jon Sangster Joost-Wim Boekesteijn Joseph Pecoraro +Josh Barnes +Josh Cohen +Josh Soref Joshua Newman Josh Watzman jots @@ -255,13 +325,19 @@ ju1ius Juan Benavides Romero Jucovschi Constantin Juho Vuori +Julien Rebetez +Justin Andresen Justin Hileman jwallers@gmail.com kaniga karevn +Kayur Patel +Kazuhito Hokamura Ken Newman +ken restivo Ken Rockot Kevin Earls +Kevin Muret Kevin Sawicki Kevin Ushey Klaus Silveira @@ -269,9 +345,11 @@ Koh Zi Han, Cliff komakino Konstantin Lopuhin koops +Kris Ciccarello ks-ifware kubelsmieci KwanEsq +Kyle Kelley Lanfei Lanny Laszlo Vidacs @@ -285,7 +363,11 @@ LloydMilligan LM lochel Lorenzo Stoakes +Luca Fabbri Luciano Longo +Lu Fangjian +Luke Browning +Luke Granger-Brown Luke Stagner lynschinzer M1cha @@ -293,9 +375,11 @@ Madhura Jayaratne Maksim Lin Maksym Taran Malay Majithia +Manideep Manuel Rego Casasnovas Marat Dreizin Marcel Gerber +Marcelo Camargo Marco Aurélio Marco Munizaga Marcus Bointon @@ -306,6 +390,7 @@ Mario Pietsch Mark Anderson Mark Lentczner Marko Bonaci +Mark Peace Markus Bordihn Martin Balek Martín Gaitán @@ -320,6 +405,7 @@ mats cronqvist Matt Gaide Matthew Bauer Matthew Beale +matthewhayes Matthew Rathbone Matthias Bussonnier Matthias BUSSONNIER @@ -333,6 +419,8 @@ Max Kirsch Max Schaefer Max Xiantu mbarkhau +McBrainy +mce2 melpon Metatheos Micah Dubinko @@ -351,6 +439,7 @@ Mike Brevoort Mike Diaz Mike Ivanov Mike Kadin +Mike Kobit MinRK Miraculix87 misfo @@ -360,6 +449,7 @@ Moritz Schwörer mps ms mtaran-google +Mu-An Chiou Narciso Jaramillo Nathan Williams ndr @@ -372,6 +462,7 @@ Nicholas Bollweg Nicholas Bollweg (Nick) Nick Kreeger Nick Small +Nicolò Ribaudo Niels van Groningen nightwing Nikita Beloglazov @@ -383,17 +474,24 @@ nlwillia noragrossman Norman Rzepka Oreoluwa Onatemowo +Oskar Segersvärd pablo +pabloferz +Pablo Zubieta Page Panupong Pasupat paris Paris +Paris Kasidiaris Patil Arpith Patrick Stoica Patrick Strawderman Paul Garvin Paul Ivanov +Paul Masson +Pavel Pavel Feldman +Pavel Petržela Pavel Strashkin Paweł Bartkiewicz peteguhl @@ -401,11 +499,17 @@ peter Peter Flynn peterkroon Peter Kroon +Philipp A Philip Stadermann +Pierre Gerold +Piët Delport +Pontus Melke prasanthj Prasanth J +Prayag Verma Radek Piórkowski Rahul +Rahul Anand ramwin1 Randall Mason Randy Burden @@ -413,30 +517,41 @@ Randy Edmunds Rasmus Erik Voel Jensen ray ratchup Ray Ratchup +Remi Nyborg +Renaud Durlin Richard Denton Richard van der Meer Richard Z.H. Wang +Rishi Goomar Robert Crossfield Roberto Abdelkader Martínez Pérez robertop23 Robert Plummer Rrandom +Rrrandom Ruslan Osmanov +Ryan Petrello Ryan Prior sabaca +Sam Lee Samuel Ainsworth +Sam Wilson sandeepshetty Sander AKA Redsandro +Sander Verweij santec Sascha Peilicke satamas satchmorun sathyamoorthi +Saul Costa S. Chris Colbert SCLINIC\jdecker Scott Aikin Scott Goodhew Sebastian Zaha +Sergey Goder +Sergey Tselovalnikov Se-Won Kim shaund shaun gilchrist @@ -446,7 +561,9 @@ sheopory Shiv Deepak Shmuel Englard Shubham Jain +Siamak Mokhtari silverwind +sinkuu snasa soliton4 sonson @@ -456,55 +573,75 @@ Stanislav Oaserele Stas Kobzar Stefan Borsje Steffen Beyer +Steffen Bruchmann Stephen Lavelle +Steve Champagne +Steve Hoover Steve O'Hara stoskov +Stu Kennedy Sungho Kim sverweij Taha Jahangir +takamori Tako Schotanus Takuji Shimokawa Tarmil +TDaglis tel tfjgeorge Thaddee Tyl thanasis TheHowl +themrmax think Thomas Dvornik +Thomas Kluyver Thomas Schmid Tim Alby Tim Baumann Timothy Farrell +Timothy Gu Timothy Hatcher TobiasBg +Todd Berman Tomas-A Tomas Varaneckas Tom Erik Støwer +Tom Klancer Tom MacWright Tony Jian Travis Heppe Triangle717 +Tristan Tarrant +TSUYUSATO Kitsune twifkak +VapidWorx Vestimir Markov vf Victor Bocharsky Vincent Woo Volker Mische +Weiyan Shao wenli Wes Cossick Wesley Wiser Will Binns-Smith +Will Dean William Jamieson William Stein Willy Wojtek Ptak +Wu Cheng-Han Xavier Mendez Yassin N. Hassan YNH Webdev Yunchi Luo Yuvi Panda +Zac Anger Zachary Dremann +Zeno Rocha Zhang Hao +Ziv zziuni 魏鹏刚 diff --git a/assets/vendor/codemirror/CHANGELOG.md b/assets/vendor/codemirror/CHANGELOG.md new file mode 100644 index 000000000..fa356a01c --- /dev/null +++ b/assets/vendor/codemirror/CHANGELOG.md @@ -0,0 +1,1094 @@ +## 5.25.2 (2017-04-20) + +### Bug fixes + +Better handling of selections that cover the whole viewport in contentEditable-mode. + +No longer accidentally scroll the editor into view when calling `setValue`. + +Work around Chrome Android bug when converting screen coordinates to editor positions. + +Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus. + +Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars. + +[javascript mode](http://codemirror.net/mode/javascript/): Recognize annotations and TypeScript-style type parameters. + +[shell mode](http://codemirror.net/mode/shell/): Handle nested braces. + +[markdown mode](http://codemirror.net/mode/markdown/): Make parsing of strong/em delimiters CommonMark-compliant. + +## 5.25.0 (2017-03-20) + +### Bug fixes + +In contentEditable-mode, properly locate changes that repeat a character when inserted with IME. + +Fix handling of selections bigger than the viewport in contentEditable mode. + +Improve handling of changes that insert or delete lines in contentEditable mode. + +Count Unicode control characters 0x80 to 0x9F as special (non-printing) chars. + +Fix handling of shadow DOM roots when finding the active element. + +Add `role=presentation` to more DOM elements to improve screen reader support. + +[merge addon](http://codemirror.net/doc/manual.html#addon_merge): Make aligning of unchanged chunks more robust. + +[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Fix comment-toggling on a block of text that starts and ends in a (differnet) block comment. + +[javascript mode](http://codemirror.net/mode/javascript/): Improve support for TypeScript syntax. + +[r mode](http://codemirror.net/mode/r/): Fix indentation after semicolon-less statements. + +[shell mode](http://codemirror.net/mode/shell/): Properly handle escaped parentheses in parenthesized expressions. + +[markdown mode](http://codemirror.net/mode/markdown/): Fix a few bugs around leaving fenced code blocks. + +[soy mode](http://codemirror.net/mode/soy/): Improve indentation. + +### New features + +[lint addon](http://codemirror.net/doc/manual.html#addon_lint): Support asynchronous linters that return promises. + +[continuelist addon](http://codemirror.net/doc/manual.html#addon_continuelist): Support continuing task lists. + +[vim bindings](http://codemirror.net/mode/demo/vim.html): Make Y behave like yy. + +[sql mode](http://codemirror.net/mode/sql/): Support sqlite dialect. + +## 5.24.2 (2017-02-22) + +### Bug fixes + +[javascript mode](http://codemirror.net/mode/javascript/): Support computed class method names. + +[merge addon](http://codemirror.net/doc/manual.html#addon_merge): Improve aligning of unchanged code in the presence of marks and line widgets. + +## 5.24.0 (2017-02-20) + +### Bug fixes + +A cursor directly before a line-wrapping break is now drawn before or after the line break depending on which direction you arrived from. + +Visual cursor motion in line-wrapped right-to-left text should be much more correct. + +Fix bug in handling of read-only marked text. + +[shell mode](http://codemirror.net/mode/shell/): Properly tokenize nested parentheses. + +[python mode](http://codemirror.net/mode/python/): Support underscores in number literals. + +[sass mode](http://codemirror.net/mode/sass/): Uses the full list of CSS properties and keywords from the CSS mode, rather than defining its own incomplete subset. + +[css mode](http://codemirror.net/mode/css/): Expose `lineComment` property for LESS and SCSS dialects. Recognize vendor prefixes on pseudo-elements. + +[julia mode](http://codemirror.net/mode/julia/): Properly indent `elseif` lines. + +[markdown mode](http://codemirror.net/mode/markdown/): Properly recognize the end of fenced code blocks when inside other markup. + +[scala mode](http://codemirror.net/mode/clike/): Improve handling of operators containing #, @, and : chars. + +[xml mode](http://codemirror.net/mode/xml/): Allow dashes in HTML tag names. + +[javascript mode](http://codemirror.net/mode/javascript/): Improve parsing of async methods, TypeScript-style comma-separated superclass lists. + +[indent-fold addon](http://codemirror.net/demo/folding.html): Ignore comment lines. + +### New features + +Positions now support a `sticky` property which determines whether they should be associated with the character before (value `"before"`) or after (value `"after"`) them. + +[vim bindings](http://codemirror.net/mode/demo/vim.html): Make it possible to remove built-in bindings through the API. + +[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Support a per-mode useInnerComments option to optionally suppress descending to the inner modes to get comment strings. + +### Breaking changes + +The [sass mode](http://codemirror.net/mode/sass/) now depends on the [css mode](http://codemirror.net/mode/css/). + +## 5.23.0 (2017-01-19) + +### Bug fixes + +Presentation-related elements DOM elements are now marked as such to help screen readers. + +[markdown mode](http://codemirror.net/mode/markdown/): Be more picky about what HTML tags look like to avoid false positives. + +### New features + +`findModeByMIME` now understands `+json` and `+xml` MIME suffixes. + +[closebrackets addon](http://codemirror.net/doc/manual.html#addon_closebrackets): Add support for an `override` option to ignore language-specific defaults. + +[panel addon](http://codemirror.net/doc/manual.html#addon_panel): Add a `stable` option that auto-scrolls the content to keep it in the same place when inserting/removing a panel. + +## 5.22.2 (2017-01-12) + +### Bug fixes + +Include rollup.config.js in NPM package, so that it can be used to build from source. + +## 5.22.0 (2016-12-20) + +### Bug fixes + +[sublime bindings](http://codemirror.net/demo/sublime.html): Make `selectBetweenBrackets` work with multiple cursors. + +[javascript mode](http://codemirror.net/mode/javascript/): Fix issues with parsing complex TypeScript types, imports, and exports. + +A contentEditable editor instance with autofocus enabled no longer crashes during initializing. + +### New features + +[emacs bindings](http://codemirror.net/demo/emacs.html): Export `CodeMirror.emacs` to allow other addons to hook into Emacs-style functionality. + +[active-line addon](http://codemirror.net/doc/manual.html#addon_active-line): Add `nonEmpty` option. + +New event: [`optionChange`](http://codemirror.net/doc/manual.html#event_optionChange). + +## 5.21.0 (2016-11-21) + +### Bug fixes + +Tapping/clicking the editor in [contentEditable mode](http://codemirror.net/doc/manual.html#option_inputStyle) on Chrome now puts the cursor at the tapped position. + +Fix various crashes and misbehaviors when reading composition events in [contentEditable mode](http://codemirror.net/doc/manual.html#option_inputStyle). + +Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a ``. + +[merge addon](http://codemirror.net/doc/manual.html#addon_merge): Fix several issues in the chunk-aligning feature. + +[verilog mode](http://codemirror.net/mode/verilog): Rewritten to address various issues. + +[julia mode](http://codemirror.net/mode/julia): Recognize Julia 0.5 syntax. + +[swift mode](http://codemirror.net/mode/swift): Various fixes and adjustments to current syntax. + +[markdown mode](http://codemirror.net/mode/markdown): Allow lists without a blank line above them. + +### New features + +The [`setGutterMarker`](http://codemirror.net/doc/manual.html#setGutterMarker), [`clearGutter`](http://codemirror.net/doc/manual.html#clearGutter), and [`lineInfo`](http://codemirror.net/doc/manual.html#lineInfo) methods are now available on `Doc` objects. + +The [`heightAtLine`](http://codemirror.net/doc/manual.html#heightAtLine) method now takes an extra argument to allow finding the height at the top of the line's line widgets. + +[ruby mode](http://codemirror.net/mode/ruby): `else` and `elsif` are now immediately indented. + +[vim bindings](http://codemirror.net/demo/vim.html): Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode. + +## 5.20.2 (2016-10-21) + +### Bug fixes + +Fix `CodeMirror.version` returning the wrong version number. + +## 5.20.0 (2016-10-20) + +### Bug fixes + +Make `newlineAndIndent` command work with multiple cursors on the same line. + +Make sure keypress events for backspace are ignored. + +Tokens styled with overlays no longer get a nonsense `cm-cm-overlay` class. + +Line endings for pasted content are now normalized to the editor's [preferred ending](http://codemirror.net/doc/manual.html#option_lineSeparator). + +[javascript mode](http://codemirror.net/mode/javascript): Improve support for class expressions. Support TypeScript optional class properties, the `abstract` keyword, and return type declarations for arrow functions. + +[css mode](http://codemirror.net/mode/css): Fix highlighting of mixed-case keywords. + +[closebrackets addon](http://codemirror.net/doc/manual.html#addon_closebrackets): Improve behavior when typing a quote before a string. + +### New features + +The core is now maintained as a number of small files, using ES6 syntax and modules, under the `src/` directory. A git checkout no longer contains a working `codemirror.js` until you `npm build` (but when installing from NPM, it is included). + +The [`refresh`](http://codemirror.net/doc/manual.html#event_refresh) event is now documented and stable. + +## 5.19.0 (2016-09-20) + +### Bugfixes + +[erlang mode](http://codemirror.net/mode/erlang): Fix mode crash when trying to read an empty context. + +[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Fix broken behavior when toggling comments inside a comment. + +xml-fold addon: Fix a null-dereference bug. + +Page up and page down now do something even in single-line documents. + +Fix an issue where the cursor position could be off in really long (~8000 character) tokens. + +### New features + +[javascript mode](http://codemirror.net/mode/javascript): Better indentation when semicolons are missing. Better support for TypeScript classes, optional parameters, and the `type` keyword. + +The [`blur`](http://codemirror.net/doc/manual.html#event_blur) and [`focus`](http://codemirror.net/doc/manual.html#event_focus) events now pass the DOM event to their handlers. + +## 5.18.2 (2016-08-23) + +### Bugfixes + +[vue mode](http://codemirror.net/mode/vue): Fix outdated references to renamed Pug mode dependency. + +## 5.18.0 (2016-08-22) + +### Bugfixes + +Make sure [gutter backgrounds](http://codemirror.net/doc/manual.html#addLineClass) stick to the rest of the gutter during horizontal scrolling. + +The contenteditable [`inputStyle`](http://codemirror.net/doc/manual.html#option_inputStyle) now properly supports pasting on pre-Edge IE versions. + +[javascript mode](http://codemirror.net/mode/javascript): Fix some small parsing bugs and improve TypeScript support. + +[matchbrackets addon](http://codemirror.net/doc/manual.html#addon_matchbrackets): Fix bug where active highlighting was left in editor when the addon was disabled. + +[match-highlighter addon](http://codemirror.net/doc/manual.html#addon_match-highlighter): Only start highlighting things when the editor gains focus. + +[javascript-hint addon](http://codemirror.net/doc/manual.html#addon_javascript-hint): Also complete non-enumerable properties. + +### New features + +The [`addOverlay`](http://codemirror.net/doc/manual.html#addOverlay) method now supports a `priority` option to control the order in which overlays are applied. + +MIME types that end in `+json` now default to the JSON mode when the MIME itself is not defined. + +### Breaking changes + +The mode formerly known as Jade was renamed to [Pug](http://codemirror.net/mode/pug). + +The [Python mode](http://codemirror.net/mode/python) now defaults to Python 3 (rather than 2) syntax. + +## 5.17.0 (2016-07-19) + +### Bugfixes + +Fix problem with wrapped trailing whitespace displaying incorrectly. + +Prevent IME dialog from overlapping typed content in Chrome. + +Improve measuring of characters near a line wrap. + +[javascript mode](http://codemirror.net/mode/javascript): Improve support for `async`, allow trailing commas in `import` lists. + +[vim bindings](http://codemirror.net/demo/vim.html): Fix backspace in replace mode. + +[sublime bindings](http://codemirror.net/demo/sublime.html): Fix some key bindings on OS X to match Sublime Text. + +### New features + +[markdown mode](http://codemirror.net/mode/markdown): Add more classes to image links in highlight-formatting mode. + +## 5.16.0 (2016-06-20) + +### Bugfixes + +Fix glitches when dragging content caused by the drop indicator receiving mouse events. + +Make Control-drag work on Firefox. + +Make clicking or selection-dragging at the end of a wrapped line select the right position. + +[show-hint addon](http://codemirror.net/doc/manual.html#addon_show-hint): Prevent widget scrollbar from hiding part of the hint text. + +[rulers addon](http://codemirror.net/doc/manual.html#addon_rulers): Prevent rulers from forcing a horizontal editor scrollbar. + +### New features + +[search addon](http://codemirror.net/doc/manual.html#addon_search): Automatically bind search-related keys in persistent dialog. + +[sublime keymap](http://codemirror.net/demo/sublime.html): Add a multi-cursor aware smart backspace binding. + +## 5.15.2 (2016-05-20) + +### Bugfixes + +Fix a critical document corruption bug that occurs when a document is gradually grown. + +## 5.15.0 (2016-05-20) + +### Bugfixes + +Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode. + +Fix issue where not all ASCII control characters were being replaced by placeholders. + +Remove the assumption that all modes have a `startState` method from several wrapping modes. + +Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any. + +Optimize document tree building when loading or pasting huge chunks of content. + +[markdown mode](http://codemirror.net/mode/markdown/): Fix several issues in matching link targets. + +[clike mode](http://codemirror.net/mode/clike/): Improve indentation of C++ template declarations. + +### New features + +Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected. + +Pasting [linewise-copied](http://codemirror.net/doc/manual.html#option_lineWiseCopyCut) content when there is no selection now inserts the lines above the current line. + +[javascript mode](http://codemirror.net/mode/javascript/): Support `async`/`await` and improve support for TypeScript type syntax. + +## 5.14.2 (2016-04-20) + +### Bugfixes + +Push a new package to NPM due to an [NPM bug](https://github.com/npm/npm/issues/5082) omitting the LICENSE file in 5.14.0. + +Set `dataTransfer.effectAllowed` in `dragstart` handler to help browsers use the right drag icon. + +Add the [mbox mode](http://codemirror.net/mode/mbox/index.html) to `mode/meta.js`. + +## 5.14.0 (2016-04-20) + +### Bugfixes + +[`posFromIndex`](http://codemirror.net/doc/manual.html#posFromIndex) and [`indexFromPos`](http://codemirror.net/doc/manual.html#indexFromPos) now take [`lineSeparator`](http://codemirror.net/doc/manual.html#option_lineSeparator) into account. + +[vim bindings](http://codemirror.net/demo/vim.html): Only call `.save()` when it is actually available. + +[comment addon](http://codemirror.net/doc/manual.html#addon_comment): Be careful not to mangle multi-line strings. + +[Python mode](http://codemirror.net/mode/python/index.html): Improve distinguishing of decorators from `@` operators. + +[`findMarks`](http://codemirror.net/doc/manual.html#findMarks): No longer return marks that touch but don't overlap given range. + +### New features + +[vim bindings](http://codemirror.net/demo/vim.html): Add yank command. + +[match-highlighter addon](http://codemirror.net/doc/manual.html#addon_match-highlighter): Add `trim` option to disable ignoring of whitespace. + +[PowerShell mode](http://codemirror.net/mode/powershell/index.html): Added. + +[Yacas mode](http://codemirror.net/mode/yacas/index.html): Added. + +[Web IDL mode](http://codemirror.net/mode/webidl/index.html): Added. + +[SAS mode](http://codemirror.net/mode/sas/index.html): Added. + +[mbox mode](http://codemirror.net/mode/mbox/index.html): Added. + +## 5.13.2 (2016-03-23) + +### Bugfixes + +Solves a problem where the gutter would sometimes not extend all the way to the end of the document. + +## 5.13.0 (2016-03-21) + +### New features + +New DOM event forwarded: [`"dragleave"`](http://codemirror.net/doc/manual.html#event_dom). + +[protobuf mode](http://codemirror.net/mode/protobuf/index.html): Newly added. + +### Bugfixes + +Fix problem where [`findMarks`](http://codemirror.net/doc/manual.html#findMarks) sometimes failed to find multi-line marks. + +Fix crash that showed up when atomic ranges and bidi text were combined. + +[show-hint addon](http://codemirror.net/demo/complete.html): Completion widgets no longer close when the line indented or dedented. + +[merge addon](http://codemirror.net/demo/merge.html): Fix bug when merging chunks at the end of the file. + +[placeholder addon](http://codemirror.net/doc/manual.html#addon_placeholder): No longer gets confused by [`swapDoc`](http://codemirror.net/doc/manual.html#swapDoc). + +[simplescrollbars addon](http://codemirror.net/doc/manual.html#addon_simplescrollbars): Fix invalid state when deleting at end of document. + +[clike mode](http://codemirror.net/mode/clike/index.html): No longer gets confused when a comment starts after an operator. + +[markdown mode](http://codemirror.net/mode/markdown/index.html): Now supports CommonMark-style flexible list indentation. + +[dylan mode](http://codemirror.net/mode/dylan/index.html): Several improvements and fixes. + +## 5.12.0 (2016-02-19) + +### New features + +[Vim bindings](http://codemirror.net/demo/vim.html): Ctrl-Q is now an alias for Ctrl-V. + +[Vim bindings](http://codemirror.net/demo/vim.html): The Vim API now exposes an `unmap` method to unmap bindings. + +[active-line addon](http://codemirror.net/demo/activeline.html): This addon can now style the active line's gutter. + +[FCL mode](http://codemirror.net/mode/fcl/): Newly added. + +[SQL mode](http://codemirror.net/mode/sql/): Now has a Postgresql dialect. + +### Bugfixes + +Fix [issue](https://github.com/codemirror/CodeMirror/issues/3781) where trying to scroll to a horizontal position outside of the document's width could cause the gutter to be positioned incorrectly. + +Use absolute, rather than fixed positioning in the context-menu intercept hack, to work around a [problem](https://github.com/codemirror/CodeMirror/issues/3238) when the editor is inside a transformed parent container. + +Solve a [problem](https://github.com/codemirror/CodeMirror/issues/3821) where the horizontal scrollbar could hide text in Firefox. + +Fix a [bug](https://github.com/codemirror/CodeMirror/issues/3834) that caused phantom scroll space under the text in some situations. + +[Sublime Text bindings](http://codemirror.net/demo/sublime.html): Bind delete-line to Shift-Ctrl-K on OS X. + +[Markdown mode](http://codemirror.net/mode/markdown/): Fix [issue](https://github.com/codemirror/CodeMirror/issues/3787) where the mode would keep state related to fenced code blocks in an unsafe way, leading to occasional corrupted parses. + +[Markdown mode](http://codemirror.net/mode/markdown/): Ignore backslashes in code fragments. + +[Markdown mode](http://codemirror.net/mode/markdown/): Use whichever mode is registered as `text/html` to parse HTML. + +[Clike mode](http://codemirror.net/mode/clike/): Improve indentation of Scala `=>` functions. + +[Python mode](http://codemirror.net/mode/python/): Improve indentation of bracketed code. + +[HTMLMixed mode](http://codemirror.net/mode/htmlmixed/): Support multi-line opening tags for sub-languages (` diff --git a/assets/vendor/codemirror/mode/css/less.html b/assets/vendor/codemirror/mode/css/less.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/css/less_test.js b/assets/vendor/codemirror/mode/css/less_test.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/css/scss.html b/assets/vendor/codemirror/mode/css/scss.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/css/scss_test.js b/assets/vendor/codemirror/mode/css/scss_test.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/css/test.js b/assets/vendor/codemirror/mode/css/test.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/haml/haml.js b/assets/vendor/codemirror/mode/haml/haml.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/haml/index.html b/assets/vendor/codemirror/mode/haml/index.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/haml/test.js b/assets/vendor/codemirror/mode/haml/test.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/htmlembedded/htmlembedded.js b/assets/vendor/codemirror/mode/htmlembedded/htmlembedded.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/htmlembedded/index.html b/assets/vendor/codemirror/mode/htmlembedded/index.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/htmlmixed/htmlmixed.js b/assets/vendor/codemirror/mode/htmlmixed/htmlmixed.js old mode 100755 new mode 100644 index eb21fcc14..16b4f139f --- a/assets/vendor/codemirror/mode/htmlmixed/htmlmixed.js +++ b/assets/vendor/codemirror/mode/htmlmixed/htmlmixed.js @@ -14,7 +14,7 @@ var defaultTags = { script: [ ["lang", /(javascript|babel)/i, "javascript"], - ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, "javascript"], + ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"], ["type", /./, "text/plain"], [null, null, "javascript"] ], diff --git a/assets/vendor/codemirror/mode/htmlmixed/index.html b/assets/vendor/codemirror/mode/htmlmixed/index.html old mode 100755 new mode 100644 index f94df9e21..caa7546c1 --- a/assets/vendor/codemirror/mode/htmlmixed/index.html +++ b/assets/vendor/codemirror/mode/htmlmixed/index.html @@ -72,15 +72,26 @@

Mixed HTML Example

The HTML mixed mode depends on the XML, JavaScript, and CSS modes.

It takes an optional mode configuration - option, scriptTypes, which can be used to add custom - behavior for specific <script type="..."> tags. If - given, it should hold an array of {matches, mode} - objects, where matches is a string or regexp that - matches the script type, and mode is - either null, for script types that should stay in - HTML mode, or a mode - spec corresponding to the mode that should be used for the - script.

+ option, tags, which can be used to add custom + behavior for specific tags. When given, it should be an object + mapping tag names (for example script) to arrays or + three-element arrays. Those inner arrays indicate [attributeName, + valueRegexp, modeSpec] + specifications. For example, you could use ["type", /^foo$/, + "foo"] to map the attribute type="foo" to + the foo mode. When the first two fields are null + ([null, null, "mode"]), the given mode is used for + any such tag that doesn't match any of the previously given + attributes. For example:

+ +
var myModeSpec = {
+  name: "htmlmixed",
+  tags: {
+    style: [["type", /^text/(x-)?scss$/, "text/x-scss"],
+            [null, null, "css"]],
+    custom: [[null, null, "customMode"]]
+  }
+}

MIME types defined: text/html (redefined, only takes effect if you load this parser after the diff --git a/assets/vendor/codemirror/mode/index.html b/assets/vendor/codemirror/mode/index.html old mode 100755 new mode 100644 index 3a2fe5513..c0001a53e --- a/assets/vendor/codemirror/mode/index.html +++ b/assets/vendor/codemirror/mode/index.html @@ -56,6 +56,7 @@

Language modes

  • EBNF
  • ECL
  • Eiffel
  • +
  • Elixir
  • Elm
  • Erlang
  • Factor
  • diff --git a/assets/vendor/codemirror/mode/javascript/index.html b/assets/vendor/codemirror/mode/javascript/index.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/javascript/javascript.js b/assets/vendor/codemirror/mode/javascript/javascript.js old mode 100755 new mode 100644 index a71774589..7c09476b3 --- a/assets/vendor/codemirror/mode/javascript/javascript.js +++ b/assets/vendor/codemirror/mode/javascript/javascript.js @@ -12,7 +12,7 @@ "use strict"; function expressionAllowed(stream, state, backUp) { - return /^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(state.lastType) || + return /^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(state.lastType) || (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) } @@ -77,7 +77,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { return jsKeywords; }(); - var isOperatorChar = /[+\-*&%=<>!?|~^]/; + var isOperatorChar = /[+\-*&%=<>!?|~^@]/; var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; function readRegexp(stream) { @@ -146,7 +146,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { stream.skipToEnd(); return ret("error", "error"); } else if (isOperatorChar.test(ch)) { - stream.eatWhile(isOperatorChar); + if (ch != ">" || !state.lexical || state.lexical.type != ">") + stream.eatWhile(isOperatorChar); return ret("operator", "operator", stream.current()); } else if (wordRE.test(ch)) { stream.eatWhile(wordRE); @@ -373,6 +374,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex) if (type == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";")); if (type == "async") return cont(statement) + if (value == "@") return cont(expression, statement) return pass(pushlex("stat"), expression, expect(";"), poplex); } function expression(type) { @@ -504,9 +506,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == ":") return cont(expressionNoComma); if (type == "(") return pass(functiondef); } - function commasep(what, end) { + function commasep(what, end, sep) { function proceed(type, value) { - if (type == ",") { + if (sep ? sep.indexOf(type) > -1 : type == ",") { var lex = cx.state.lexical; if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; return cont(function(type, value) { @@ -539,16 +541,19 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { } function typeexpr(type) { if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);} - if (type == "{") return cont(commasep(typeprop, "}")) + if (type == "string" || type == "number" || type == "atom") return cont(afterType); + if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex) if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType) } function maybeReturnType(type) { if (type == "=>") return cont(typeexpr) } - function typeprop(type) { + function typeprop(type, value) { if (type == "variable" || cx.style == "keyword") { cx.marked = "property" return cont(typeprop) + } else if (value == "?") { + return cont(typeprop) } else if (type == ":") { return cont(typeexpr) } @@ -558,7 +563,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { else if (type == ":") return cont(typeexpr) } function afterType(type, value) { - if (value == "<") return cont(commasep(typeexpr, ">"), afterType) + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) + if (value == "|" || type == ".") return cont(typeexpr) if (type == "[") return cont(expect("]"), afterType) } function vardef() { @@ -615,6 +621,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} if (type == "variable") {register(value); return cont(functiondef);} if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, maybetype, statement, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, functiondef) } function funarg(type) { if (type == "spread") return cont(funarg); @@ -629,12 +636,14 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (type == "variable") {register(value); return cont(classNameAfter);} } function classNameAfter(type, value) { - if (value == "extends" || value == "implements") return cont(isTS ? typeexpr : expression, classNameAfter); + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, classNameAfter) + if (value == "extends" || value == "implements" || (isTS && type == ",")) + return cont(isTS ? typeexpr : expression, classNameAfter); if (type == "{") return cont(pushlex("}"), classBody, poplex); } function classBody(type, value) { if (type == "variable" || cx.style == "keyword") { - if ((value == "static" || value == "get" || value == "set" || + if ((value == "async" || value == "static" || value == "get" || value == "set" || (isTS && (value == "public" || value == "private" || value == "protected" || value == "readonly" || value == "abstract"))) && cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false)) { cx.marked = "keyword"; @@ -643,26 +652,35 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { cx.marked = "property"; return cont(isTS ? classfield : functiondef, classBody); } + if (type == "[") + return cont(expression, expect("]"), isTS ? classfield : functiondef, classBody) if (value == "*") { cx.marked = "keyword"; return cont(classBody); } if (type == ";") return cont(classBody); if (type == "}") return cont(); + if (value == "@") return cont(expression, classBody) } function classfield(type, value) { if (value == "?") return cont(classfield) if (type == ":") return cont(typeexpr, maybeAssign) + if (value == "=") return cont(expressionNoComma) return pass(functiondef) } - function afterExport(_type, value) { + function afterExport(type, value) { if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } + if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";")); return pass(statement); } + function exportField(type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); } + if (type == "variable") return pass(expressionNoComma, exportField); + } function afterImport(type) { if (type == "string") return cont(); - return pass(importSpec, maybeFrom); + return pass(importSpec, maybeMoreImports, maybeFrom); } function importSpec(type, value) { if (type == "{") return contCommasep(importSpec, "}"); @@ -670,6 +688,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) { if (value == "*") cx.marked = "keyword"; return cont(maybeAs); } + function maybeMoreImports(type) { + if (type == ",") return cont(importSpec, maybeMoreImports) + } function maybeAs(_type, value) { if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } } diff --git a/assets/vendor/codemirror/mode/javascript/json-ld.html b/assets/vendor/codemirror/mode/javascript/json-ld.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/javascript/test.js b/assets/vendor/codemirror/mode/javascript/test.js old mode 100755 new mode 100644 index 41765e75d..9abbf365c --- a/assets/vendor/codemirror/mode/javascript/test.js +++ b/assets/vendor/codemirror/mode/javascript/test.js @@ -48,6 +48,12 @@ " [property sub]([def a], [def b]) {}", "};"); + MT("class_async_method", + "[keyword class] [def Foo] {", + " [property sayName1]() {}", + " [keyword async] [property sayName2]() {}", + "}"); + MT("import", "[keyword function] [def foo]() {", " [keyword import] [def $] [keyword from] [string 'jquery'];", @@ -190,6 +196,36 @@ " }", "}"); + MT("async", + "[keyword async] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }"); + + MT("async_assignment", + "[keyword const] [def foo] [operator =] [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; };"); + + MT("async_object", + "[keyword let] [def obj] [operator =] { [property async]: [atom false] };"); + + // async be highlighet as keyword and foo as def, but it requires potentially expensive look-ahead. See #4173 + MT("async_object_function", + "[keyword let] [def obj] [operator =] { [property async] [property foo]([def args]) { [keyword return] [atom true]; } };"); + + MT("async_object_properties", + "[keyword let] [def obj] [operator =] {", + " [property prop1]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },", + " [property prop2]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },", + " [property prop3]: [keyword async] [keyword function] [def prop3]([def args]) { [keyword return] [atom true]; },", + "};"); + + MT("async_arrow", + "[keyword const] [def foo] [operator =] [keyword async] ([def args]) [operator =>] { [keyword return] [atom true]; };"); + + MT("async_jquery", + "[variable $].[property ajax]({", + " [property url]: [variable url],", + " [property async]: [atom true],", + " [property method]: [string 'GET']", + "});"); + var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript") function TS(name) { test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1)) @@ -207,6 +243,58 @@ " [keyword private] [property _foo]: [variable-3 string];", "}") + TS("typescript_literal_types", + "[keyword import] [keyword *] [keyword as] [def Sequelize] [keyword from] [string 'sequelize'];", + "[keyword interface] [def MyAttributes] {", + " [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];", + " [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];", + "}", + "[keyword interface] [def MyInstance] [keyword extends] [variable-3 Sequelize].[variable-3 Instance] [operator <] [variable-3 MyAttributes] [operator >] {", + " [property rawAttributes]: [variable-3 MyAttributes];", + " [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];", + " [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];", + "}") + + TS("typescript_extend_operators", + "[keyword export] [keyword interface] [def UserModel] [keyword extends]", + " [variable-3 Sequelize].[variable-3 Model] [operator <] [variable-3 UserInstance], [variable-3 UserAttributes] [operator >] {", + " [property findById]: (", + " [variable userId]: [variable-3 number]", + " ) [operator =>] [variable-3 Promise] [operator <] [variable-3 Array] [operator <] { [property id], [property name] } [operator >>];", + " [property updateById]: (", + " [variable userId]: [variable-3 number],", + " [variable isActive]: [variable-3 boolean]", + " ) [operator =>] [variable-3 Promise] [operator <] [variable-3 AccountHolderNotificationPreferenceInstance] [operator >];", + " }") + + TS("typescript_interface_with_const", + "[keyword const] [def hello]: {", + " [property prop1][operator ?]: [variable-3 string];", + " [property prop2][operator ?]: [variable-3 string];", + "} [operator =] {};") + + TS("typescript_double_extend", + "[keyword export] [keyword interface] [def UserAttributes] {", + " [property id][operator ?]: [variable-3 number];", + " [property createdAt][operator ?]: [variable-3 Date];", + "}", + "[keyword export] [keyword interface] [def UserInstance] [keyword extends] [variable-3 Sequelize].[variable-3 Instance][operator <][variable-3 UserAttributes][operator >], [variable-3 UserAttributes] {", + " [property id]: [variable-3 number];", + " [property createdAt]: [variable-3 Date];", + "}"); + + TS("typescript_index_signature", + "[keyword interface] [def A] {", + " [[ [variable prop]: [variable-3 string] ]]: [variable-3 any];", + " [property prop1]: [variable-3 any];", + "}"); + + TS("generic_class", + "[keyword class] [def Foo][operator <][variable-3 T][operator >] {", + " [property bar]() {}", + " [property foo](): [variable-3 Foo] {}", + "}") + var jsonld_mode = CodeMirror.getMode( {indentUnit: 2}, {name: "javascript", jsonld: true} diff --git a/assets/vendor/codemirror/mode/javascript/typescript.html b/assets/vendor/codemirror/mode/javascript/typescript.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/markdown/index.html b/assets/vendor/codemirror/mode/markdown/index.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/markdown/markdown.js b/assets/vendor/codemirror/mode/markdown/markdown.js old mode 100755 new mode 100644 index 3dcce8d3b..6060ae371 --- a/assets/vendor/codemirror/mode/markdown/markdown.js +++ b/assets/vendor/codemirror/mode/markdown/markdown.js @@ -35,10 +35,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { if (modeCfg.maxBlockquoteDepth === undefined) modeCfg.maxBlockquoteDepth = 0; - // Should underscores in words open/close em/strong? - if (modeCfg.underscoresBreakWords === undefined) - modeCfg.underscoresBreakWords = true; - // Use `fencedCodeBlocks` to configure fenced code blocks. false to // disable, string to specify a precise regexp that the fence should // match, and true to allow three or more backticks or tildes (as @@ -83,14 +79,14 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { } var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/ - , ulRE = /^[*\-+]\s+/ - , olRE = /^[0-9]+([.)])\s+/ - , taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE + , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/ + , taskListRE = /^\[(x| )\](?=\s)/ // Must follow listRE , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/ , setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/ , textRE = /^[^#!\[\]*_\\<>` "'(~]+/ , fencedCodeRE = new RegExp("^(" + (modeCfg.fencedCodeBlocks === true ? "~~~+|```+" : modeCfg.fencedCodeBlocks) + - ")[ \\t]*([\\w+#\-]*)"); + ")[ \\t]*([\\w+#\-]*)") + , punctuation = /[!\"#$%&\'()*+,\-\.\/:;<=>?@\[\\\]^_`{|}~—]/ function switchInline(stream, state, f) { state.f = state.inline = f; @@ -121,7 +117,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { state.quote = 0; // Reset state.indentedCode state.indentedCode = false; - if (htmlModeMissing && state.f == htmlBlock) { + if (state.f == htmlBlock) { state.f = inlineNormal; state.block = blockNormal; } @@ -189,14 +185,8 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { } else if (stream.match(hrRE, true)) { state.hr = true; return tokenTypes.hr; - } else if ((lineIsEmpty(state.prevLine) || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) { - var listType = null; - if (stream.match(ulRE, true)) { - listType = 'ul'; - } else { - stream.match(olRE, true); - listType = 'ol'; - } + } else if (match = stream.match(listRE)) { + var listType = match[1] ? "ol" : "ul"; state.indentation = stream.column() + stream.current().length; state.list = true; @@ -246,10 +236,17 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { } function local(stream, state) { - if (state.fencedChars && stream.match(state.fencedChars, false)) { + if (state.fencedChars && stream.match(state.fencedChars)) { + if (modeCfg.highlightFormatting) state.formatting = "code-block"; + var returnType = getType(state) state.localMode = state.localState = null; - state.f = state.block = leavingLocal; - return null; + state.block = blockNormal; + state.f = inlineNormal; + state.fencedChars = null; + state.code = 0 + return returnType; + } else if (state.fencedChars && stream.skipTo(state.fencedChars)) { + return "comment" } else if (state.localMode) { return state.localMode.token(stream, state.localState); } else { @@ -258,18 +255,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { } } - function leavingLocal(stream, state) { - stream.match(state.fencedChars); - state.block = blockNormal; - state.f = inlineNormal; - state.fencedChars = null; - if (modeCfg.highlightFormatting) state.formatting = "code-block"; - state.code = 1 - var returnType = getType(state); - state.code = 0 - return returnType; - } - // Inline function getType(state) { var styles = []; @@ -387,9 +372,6 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return getType(state); } - // Get sol() value now, before character is consumed - var sol = stream.sol(); - var ch = stream.next(); // Matches link titles present on next line @@ -399,7 +381,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { if (ch === '(') { matchCh = ')'; } - matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); + matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1"); var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh; if (stream.match(new RegExp(regex), true)) { return tokenTypes.linkHref; @@ -443,7 +425,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return getType(state); } - if (ch === '[' && state.imageMarker) { + if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) { state.imageMarker = false; state.imageAltText = true if (modeCfg.highlightFormatting) state.formatting = "image"; @@ -497,7 +479,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { return type + tokenTypes.linkEmail; } - if (ch === '<' && stream.match(/^(!--|\w)/, false)) { + if (ch === '<' && stream.match(/^(!--|[a-z]+(?:\s+[a-z_:.\-]+(?:\s*=\s*[^ >]+)?)*\s*>)/i, false)) { var end = stream.string.indexOf(">", stream.pos); if (end != -1) { var atts = stream.string.substring(stream.start, end); @@ -511,41 +493,34 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { if (ch === '<' && stream.match(/^\/\w*?>/)) { state.md_inside = false; return "tag"; - } - - var ignoreUnderscore = false; - if (!modeCfg.underscoresBreakWords) { - if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) { - var prevPos = stream.pos - 2; - if (prevPos >= 0) { - var prevCh = stream.string.charAt(prevPos); - if (prevCh !== '_' && prevCh.match(/(\w)/, false)) { - ignoreUnderscore = true; - } - } + } else if (ch === "*" || ch === "_") { + var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2) + while (len < 3 && stream.eat(ch)) len++ + var after = stream.peek() || " " + // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis + var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before)) + var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after)) + var setEm = null, setStrong = null + if (len % 2) { // Em + if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) + setEm = true + else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) + setEm = false } - } - if (ch === '*' || (ch === '_' && !ignoreUnderscore)) { - if (sol && stream.peek() === ' ') { - // Do nothing, surrounded by newline and space - } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG - if (modeCfg.highlightFormatting) state.formatting = "strong"; - var t = getType(state); - state.strong = false; - return t; - } else if (!state.strong && stream.eat(ch)) { // Add STRONG - state.strong = ch; - if (modeCfg.highlightFormatting) state.formatting = "strong"; - return getType(state); - } else if (state.em === ch) { // Remove EM - if (modeCfg.highlightFormatting) state.formatting = "em"; - var t = getType(state); - state.em = false; - return t; - } else if (!state.em) { // Add EM - state.em = ch; - if (modeCfg.highlightFormatting) state.formatting = "em"; - return getType(state); + if (len > 1) { // Strong + if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) + setStrong = true + else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) + setStrong = false + } + if (setStrong != null || setEm != null) { + if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em" + if (setEm === true) state.em = ch + if (setStrong === true) state.strong = ch + var t = getType(state) + if (setEm === false) state.em = false + if (setStrong === false) state.strong = false + return t } } else if (ch === ' ') { if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces diff --git a/assets/vendor/codemirror/mode/markdown/test.js b/assets/vendor/codemirror/mode/markdown/test.js old mode 100755 new mode 100644 index 2f43a170c..51b55706d --- a/assets/vendor/codemirror/mode/markdown/test.js +++ b/assets/vendor/codemirror/mode/markdown/test.js @@ -357,11 +357,10 @@ "[variable-2 1. foo]", "[variable-2 2. bar]"); - // Lists require a preceding blank line (per Dingus) - MT("listBogus", + MT("listFromParagraph", "foo", - "1. bar", - "2. hello"); + "[variable-2 1. bar]", + "[variable-2 2. hello]"); // List after hr MT("listAfterHr", @@ -382,28 +381,28 @@ MT("listAsteriskFormatting", "[variable-2 * ][variable-2&em *foo*][variable-2 bar]", "[variable-2 * ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 * ][variable-2&em&strong ***foo***][variable-2 bar]", "[variable-2 * ][variable-2&comment `foo`][variable-2 bar]"); // Formatting in lists (+) MT("listPlusFormatting", "[variable-2 + ][variable-2&em *foo*][variable-2 bar]", "[variable-2 + ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 + ][variable-2&em&strong ***foo***][variable-2 bar]", "[variable-2 + ][variable-2&comment `foo`][variable-2 bar]"); // Formatting in lists (-) MT("listDashFormatting", "[variable-2 - ][variable-2&em *foo*][variable-2 bar]", "[variable-2 - ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 - ][variable-2&em&strong ***foo***][variable-2 bar]", "[variable-2 - ][variable-2&comment `foo`][variable-2 bar]"); // Formatting in lists (1.) MT("listNumberFormatting", "[variable-2 1. ][variable-2&em *foo*][variable-2 bar]", "[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]", - "[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 3. ][variable-2&em&strong ***foo***][variable-2 bar]", "[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]"); // Paragraph lists @@ -606,7 +605,7 @@ "[image&image-marker !][image&image-alt-text&link [[][image-alt-text&strong&image&link **alt text**][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); MT("imageEmStrong", - "[image&image-marker !][image&image-alt-text&link [[][image-alt-text&image&strong&link **][image&image-alt-text&em&strong&link *alt text**][image&image-alt-text&em&link *][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); + "[image&image-marker !][image&image-alt-text&link [[][image&image-alt-text&em&strong&link ***alt text***][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); // Inline link with title MT("linkTitle", @@ -630,7 +629,7 @@ // Inline link with EmStrong MT("linkEmStrong", - "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url (http://example.com/)] bar"); + "[link [[][link&em&strong ***foo***][link ]]][string&url (http://example.com/)] bar"); // Image with title MT("imageTitle", @@ -664,7 +663,7 @@ // Reference-style links with EmStrong MT("linkReferenceEmStrong", - "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string&url [[bar]]] hello"); + "[link [[][link&em&strong ***foo***][link ]]][string&url [[bar]]] hello"); // Reference-style links with optional space separator (per documentation) // "You can optionally use a space to separate the sets of brackets" @@ -758,7 +757,7 @@ "foo[em *bar*]hello"); MT("emInWordUnderscore", - "foo[em _bar_]hello"); + "foo_bar_hello"); // Per documentation: "...surround an * or _ with spaces, it’ll be // treated as a literal asterisk or underscore." @@ -767,11 +766,11 @@ "foo [em _bar _ hello_] world"); MT("emEscapedBySpaceOut", - "foo _ bar[em _hello_]world"); + "foo _ bar [em _hello_] world"); MT("emEscapedByNewline", "foo", - "_ bar[em _hello_]world"); + "_ bar [em _hello_] world"); // Unclosed emphasis characters // Instead of simply marking as EM / STRONG, it would be nice to have an @@ -792,14 +791,14 @@ "[em *foo][em&strong **bar*][strong hello**] world"); MT("emStrongUnderscore", - "[em _foo][em&strong __bar_][strong hello__] world"); + "[em _foo ][em&strong __bar_][strong hello__] world"); // "...same character must be used to open and close an emphasis span."" MT("emStrongMixed", "[em _foo][em&strong **bar*hello__ world]"); MT("emStrongMixed", - "[em *foo][em&strong __bar_hello** world]"); + "[em *foo ][em&strong __bar_hello** world]"); MT("linkWithNestedParens", "[link [[foo]]][string&url (bar(baz))]") diff --git a/assets/vendor/codemirror/mode/mathematica/index.html b/assets/vendor/codemirror/mode/mathematica/index.html new file mode 100644 index 000000000..57c429853 --- /dev/null +++ b/assets/vendor/codemirror/mode/mathematica/index.html @@ -0,0 +1,72 @@ + + +CodeMirror: Mathematica mode + + + + + + + + + + +
    +

    Mathematica mode

    + + + + + + +

    MIME types defined: text/x-mathematica (Mathematica).

    +
    diff --git a/assets/vendor/codemirror/mode/meta.js b/assets/vendor/codemirror/mode/meta.js old mode 100755 new mode 100644 index 47e9a31ce..0a3dd2ca9 --- a/assets/vendor/codemirror/mode/meta.js +++ b/assets/vendor/codemirror/mode/meta.js @@ -109,7 +109,7 @@ {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/}, {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]}, {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]}, - {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"], alias: ["rscript"]}, + {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]}, {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]}, {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"}, {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]}, @@ -130,6 +130,7 @@ {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]}, {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]}, {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]}, + {name: "SQLite", mime: "text/x-sqlite", mode: "sql"}, {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]}, {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]}, {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]}, @@ -147,6 +148,7 @@ {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]}, {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]}, {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]}, + {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]}, {name: "Twig", mime: "text/x-twig", mode: "twig"}, {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]}, {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]}, @@ -154,10 +156,11 @@ {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]}, {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]}, {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]}, - {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"], alias: ["rss", "wsdl", "xsd"]}, + {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]}, + {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]}, {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]}, {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]}, - {name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]}, + {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]}, {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}, {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]}, {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]}, @@ -177,6 +180,8 @@ if (info.mimes) for (var j = 0; j < info.mimes.length; j++) if (info.mimes[j] == mime) return info; } + if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml") + if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json") }; CodeMirror.findModeByExtension = function(ext) { diff --git a/assets/vendor/codemirror/mode/php/index.html b/assets/vendor/codemirror/mode/php/index.html old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/php/php.js b/assets/vendor/codemirror/mode/php/php.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/php/test.js b/assets/vendor/codemirror/mode/php/test.js old mode 100755 new mode 100644 diff --git a/assets/vendor/codemirror/mode/sass/index.html b/assets/vendor/codemirror/mode/sass/index.html old mode 100755 new mode 100644 index 9f4a79022..6305649e5 --- a/assets/vendor/codemirror/mode/sass/index.html +++ b/assets/vendor/codemirror/mode/sass/index.html @@ -7,6 +7,7 @@ +