Commit eaba53bc authored by Arnaud Fontaine's avatar Arnaud Fontaine

erp5_code_mirror: Update CodeMirror to 4.11.

Incompatibilities fixed:
  * python-hint.js was removed in favor of hintWords functionality (TODO for ERP5).
  * diff_match_patch is not shipped with CodeMirror anymore.
  * lint addon API change.
parent f5fbe5eb
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
-->\n -->\n
<link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/hint/show-hint.css">\n <link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/hint/show-hint.css">\n
<script src="&dtml-portal_url;/codemirror/addon/hint/show-hint.js"></script>\n <script src="&dtml-portal_url;/codemirror/addon/hint/show-hint.js"></script>\n
<script src="&dtml-portal_url;/codemirror/addon/hint/python-hint.js"></script>\n
\n \n
<!-- Code folding -->\n <!-- Code folding -->\n
<link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/fold/foldgutter.css">\n <link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/fold/foldgutter.css">\n
...@@ -61,7 +60,7 @@ ...@@ -61,7 +60,7 @@
\n \n
<!-- Merge -->\n <!-- Merge -->\n
<link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/merge/merge.css">\n <link rel="stylesheet" href="&dtml-portal_url;/codemirror/addon/merge/merge.css">\n
<script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/merge/dep/diff_match_patch.js"></script>\n <script type="text/javascript" src="&dtml-portal_url;/diff_match_patch/javascript/diff_match_patch_uncompressed.js"></script>\n
<script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/merge/merge.js"></script>\n <script type="text/javascript" src="&dtml-portal_url;/codemirror/addon/merge/merge.js"></script>\n
\n \n
<!-- Lint\n <!-- Lint\n
...@@ -400,11 +399,10 @@ ...@@ -400,11 +399,10 @@
is_maximized = true;\n is_maximized = true;\n
}\n }\n
\n \n
function checkPythonSourceCode(cm, updateLinting, options) {\n function checkPythonSourceCode(text, updateLinting, options, cm) {\n
// CodeMirror.registerHelper("lint", "python", function(text) {\n
$.post(\n $.post(\n
\'&dtml-portal_url;/ERP5Site_checkPythonSourceCodeAsJSON\',\n \'&dtml-portal_url;/ERP5Site_checkPythonSourceCodeAsJSON\',\n
{\'data\': JSON.stringify({code: cm.getValue()})},\n {\'data\': JSON.stringify({code: text})},\n
function(data){\n function(data){\n
var messages = data.annotations;\n var messages = data.annotations;\n
var found = [];\n var found = [];\n
...@@ -440,8 +438,8 @@ ...@@ -440,8 +438,8 @@
gutters: ["CodeMirror-lint-markers",\n gutters: ["CodeMirror-lint-markers",\n
"CodeMirror-linenumbers",\n "CodeMirror-linenumbers",\n
"CodeMirror-foldgutter"],\n "CodeMirror-foldgutter"],\n
lintWith: {"getAnnotations": checkPythonSourceCode,\n lint: {"getAnnotations": checkPythonSourceCode,\n
"async": true}\n "async": true}\n
});\n });\n
//cm.foldCode(CodeMirror.Pos(8, 0));\n //cm.foldCode(CodeMirror.Pos(8, 0));\n
\n \n
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>spec.css</string> </value> <value> <string>.gitattributes</string> </value>
</item> </item>
<item> <item>
<key> <string>_vars</string> </key> <key> <string>_vars</string> </key>
...@@ -24,11 +24,14 @@ ...@@ -24,11 +24,14 @@
</item> </item>
<item> <item>
<key> <string>raw</string> </key> <key> <string>raw</string> </key>
<value> <string>.cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;}\n <value> <string>*.txt text\n
.cm-s-default span.cm-macro {color: #b218b2;}\n *.js text\n
.cm-s-default span.cm-section {color: green; font-weight: bold;}\n *.html text\n
.cm-s-default span.cm-script {color: red;}\n *.md text\n
.cm-s-default span.cm-issue {color: yellow;}\n *.json text\n
*.yml text\n
*.css text\n
*.svg text\n
</string> </value> </string> </value>
</item> </item>
</dictionary> </dictionary>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>.gitignore</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string>/node_modules\n
/npm-debug.log\n
test.html\n
.tern-*\n
*~\n
*.swp\n
.idea\n
*.iml\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLMethod" module="OFS.DTMLMethod"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>.travis.yml</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string>language: node_js\n
node_js:\n
- 0.8\n
</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -28,29 +28,41 @@ ...@@ -28,29 +28,41 @@
\n \n
4r2r\n 4r2r\n
Aaron Brooks\n Aaron Brooks\n
Abdelouahab\n
Abe Fettig\n Abe Fettig\n
Adam Ahmed\n
Adam King\n Adam King\n
adanlobato\n adanlobato\n
Adán Lobato\n Adán Lobato\n
Adrian Aichner\n
aeroson\n aeroson\n
Ahmad Amireh\n Ahmad Amireh\n
Ahmad M. Zawawi\n Ahmad M. Zawawi\n
ahoward\n ahoward\n
Akeksandr Motsjonov\n Akeksandr Motsjonov\n
Alberto González Palomo\n
Alberto Pose\n Alberto Pose\n
Albert Xing\n Albert Xing\n
Alexander Pavlov\n Alexander Pavlov\n
Alexander Schepanovski\n Alexander Schepanovski\n
Alexander Shvets\n
Alexander Solovyov\n Alexander Solovyov\n
Alexandre Bique\n
alexey-k\n alexey-k\n
Alex Piggott\n Alex Piggott\n
Amsul\n Amsul\n
amuntean\n
Amy\n Amy\n
Ananya Sen\n Ananya Sen\n
anaran\n anaran\n
AndersMad\n AndersMad\n
Anders Nawroth\n
Anderson Mesquita\n Anderson Mesquita\n
Andrea G\n
Andreas Reischuck\n
Andre von Houck\n Andre von Houck\n
Andrey Fedorov\n
Andrey Klyuchnikov\n
Andrey Lushnikov\n Andrey Lushnikov\n
Andy Joslin\n Andy Joslin\n
Andy Kimball\n Andy Kimball\n
...@@ -62,52 +74,72 @@ Ansel Santosa\n ...@@ -62,52 +74,72 @@ Ansel Santosa\n
Anthony Grimes\n Anthony Grimes\n
Anton Kovalyov\n Anton Kovalyov\n
areos\n areos\n
as3boyan\n
AtomicPages LLC\n AtomicPages LLC\n
Atul Bhouraskar\n Atul Bhouraskar\n
Aurelian Oancea\n Aurelian Oancea\n
Bastian Müller\n Bastian Müller\n
Bem Jones-Bey\n
benbro\n benbro\n
Beni Cherniavsky-Paskin\n Beni Cherniavsky-Paskin\n
Benjamin DeCoste\n Benjamin DeCoste\n
Ben Keen\n Ben Keen\n
Bernhard Sirlinger\n Bernhard Sirlinger\n
Bert Chang\n
Billy Moon\n Billy Moon\n
binny\n
B Krishna Chaitanya\n
Blaine G\n Blaine G\n
blukat29\n
boomyjee\n boomyjee\n
borawjm\n borawjm\n
Brandon Frohs\n Brandon Frohs\n
Brandon Wamboldt\n Brandon Wamboldt\n
Brett Zamir\n Brett Zamir\n
Brian Grinstead\n
Brian Sletten\n Brian Sletten\n
Bruce Mitchener\n Bruce Mitchener\n
Chandra Sekhar Pydi\n Chandra Sekhar Pydi\n
Charles Skelton\n Charles Skelton\n
Cheah Chu Yeow\n
Chris Coyier\n Chris Coyier\n
Chris Granger\n Chris Granger\n
Chris Houseknecht\n Chris Houseknecht\n
Chris Morgan\n Chris Morgan\n
Christian Oyarzun\n
Christopher Brown\n Christopher Brown\n
ciaranj\n ciaranj\n
CodeAnimal\n CodeAnimal\n
ComFreek\n ComFreek\n
Curtis Gagliardi\n Curtis Gagliardi\n
dagsta\n dagsta\n
daines\n
Dale Jung\n
Dan Bentley\n
Dan Heberden\n Dan Heberden\n
Daniel, Dao Quang Minh\n Daniel, Dao Quang Minh\n
Daniele Di Sarli\n
Daniel Faust\n Daniel Faust\n
Daniel Huigens\n Daniel Huigens\n
Daniel KJ\n Daniel KJ\n
Daniel Neel\n Daniel Neel\n
Daniel Parnell\n Daniel Parnell\n
Danny Yoo\n Danny Yoo\n
darealshinji\n
Darius Roberts\n Darius Roberts\n
Dave Myers\n
David Mignot\n David Mignot\n
David Pathakjee\n David Pathakjee\n
David Vázquez\n
deebugger\n deebugger\n
Deep Thought\n Deep Thought\n
Devon Carew\n
dignifiedquire\n
Dimage Sapelkin\n
domagoj412\n domagoj412\n
Dominator008\n Dominator008\n
Domizio Demichelis\n Domizio Demichelis\n
Doug Wikle\n
Drew Bratcher\n Drew Bratcher\n
Drew Hintz\n Drew Hintz\n
Drew Khoury\n Drew Khoury\n
...@@ -121,6 +153,7 @@ Eric Allam\n ...@@ -121,6 +153,7 @@ Eric Allam\n
eustas\n eustas\n
Fabien O\'Carroll\n Fabien O\'Carroll\n
Fabio Zendhi Nagao\n Fabio Zendhi Nagao\n
Faiza Alsaied\n
Fauntleroy\n Fauntleroy\n
fbuchinger\n fbuchinger\n
feizhang365\n feizhang365\n
...@@ -132,20 +165,30 @@ ForbesLindesay\n ...@@ -132,20 +165,30 @@ ForbesLindesay\n
Forbes Lindesay\n Forbes Lindesay\n
Ford_Lawnmower\n Ford_Lawnmower\n
Frank Wiegand\n Frank Wiegand\n
Gabriel Gheorghian\n
Gabriel Horner\n
Gabriel Nahmias\n Gabriel Nahmias\n
galambalazs\n galambalazs\n
Gautam Mehta\n Gautam Mehta\n
gekkoe\n
Gerard Braad\n
Gergely Hegykozi\n
Glenn Jorde\n Glenn Jorde\n
Glenn Ruehle\n Glenn Ruehle\n
Golevka\n Golevka\n
Gordon Smith\n Gordon Smith\n
Grant Skinner\n Grant Skinner\n
greengiant\n greengiant\n
Gregory Koberger\n
Guillaume Massé\n Guillaume Massé\n
Guillaume Massé\n Guillaume Massé\n
Gustavo Rodrigues\n
Hakan Tunc\n
Hans Engel\n Hans Engel\n
Hardest\n Hardest\n
Hasan Karahan\n Hasan Karahan\n
Herculano Campos\n
Hiroyuki Makino\n
hitsthings\n hitsthings\n
Hocdoc\n Hocdoc\n
Ian Beck\n Ian Beck\n
...@@ -161,6 +204,7 @@ Ivan Kurnosov\n ...@@ -161,6 +204,7 @@ Ivan Kurnosov\n
Jacob Lee\n Jacob Lee\n
Jakob Miland\n Jakob Miland\n
Jakub Vrana\n Jakub Vrana\n
Jakub Vrána\n
James Campos\n James Campos\n
James Thorne\n James Thorne\n
Jamie Hill\n Jamie Hill\n
...@@ -169,15 +213,19 @@ jankeromnes\n ...@@ -169,15 +213,19 @@ jankeromnes\n
Jan Keromnes\n Jan Keromnes\n
Jan Odvarko\n Jan Odvarko\n
Jan T. Sott\n Jan T. Sott\n
Jared Forsyth\n
Jason\n Jason\n
Jason Barnabe\n
Jason Grout\n Jason Grout\n
Jason Johnston\n Jason Johnston\n
Jason San Jose\n Jason San Jose\n
Jason Siefken\n Jason Siefken\n
Jaydeep Solanki\n
Jean Boussier\n Jean Boussier\n
jeffkenton\n jeffkenton\n
Jeff Pickhardt\n Jeff Pickhardt\n
jem (graphite)\n jem (graphite)\n
Jeremy Parmenter\n
Jochen Berger\n Jochen Berger\n
Johan Ask\n Johan Ask\n
John Connor\n John Connor\n
...@@ -187,19 +235,23 @@ John Van Der Loo\n ...@@ -187,19 +235,23 @@ John Van Der Loo\n
Jonathan Malmaud\n Jonathan Malmaud\n
jongalloway\n jongalloway\n
Jon Malmaud\n Jon Malmaud\n
Jon Sangster\n
Joost-Wim Boekesteijn\n Joost-Wim Boekesteijn\n
Joseph Pecoraro\n Joseph Pecoraro\n
Joshua Newman\n Joshua Newman\n
Josh Watzman\n
jots\n jots\n
jsoojeon\n jsoojeon\n
Juan Benavides Romero\n Juan Benavides Romero\n
Jucovschi Constantin\n Jucovschi Constantin\n
Juho Vuori\n Juho Vuori\n
Justin Hileman\n
jwallers@gmail.com\n jwallers@gmail.com\n
kaniga\n kaniga\n
Ken Newman\n Ken Newman\n
Ken Rockot\n Ken Rockot\n
Kevin Sawicki\n Kevin Sawicki\n
Kevin Ushey\n
Klaus Silveira\n Klaus Silveira\n
Koh Zi Han, Cliff\n Koh Zi Han, Cliff\n
komakino\n komakino\n
...@@ -207,22 +259,31 @@ Konstantin Lopuhin\n ...@@ -207,22 +259,31 @@ Konstantin Lopuhin\n
koops\n koops\n
ks-ifware\n ks-ifware\n
kubelsmieci\n kubelsmieci\n
Lanfei\n
Lanny\n Lanny\n
Laszlo Vidacs\n Laszlo Vidacs\n
leaf corcoran\n leaf corcoran\n
Leonid Khachaturov\n
Leon Sorokin\n
Leonya Khachaturov\n Leonya Khachaturov\n
Liam Newman\n Liam Newman\n
LM\n LM\n
lochel\n
Lorenzo Stoakes\n Lorenzo Stoakes\n
Luciano Longo\n Luciano Longo\n
Luke Stagner\n
lynschinzer\n lynschinzer\n
Maksim Lin\n Maksim Lin\n
Maksym Taran\n Maksym Taran\n
Malay Majithia\n
Manuel Rego Casasnovas\n Manuel Rego Casasnovas\n
Marat Dreizin\n Marat Dreizin\n
Marcel Gerber\n
Marco Aurélio\n Marco Aurélio\n
Marco Munizaga\n Marco Munizaga\n
Marcus Bointon\n
Marijn Haverbeke\n Marijn Haverbeke\n
Mário Gonçalves\n
Mario Pietsch\n Mario Pietsch\n
Mark Lentczner\n Mark Lentczner\n
Marko Bonaci\n Marko Bonaci\n
...@@ -231,15 +292,19 @@ Martín Gaitán\n ...@@ -231,15 +292,19 @@ Martín Gaitán\n
Martin Hasoň\n Martin Hasoň\n
Mason Malone\n Mason Malone\n
Mateusz Paprocki\n Mateusz Paprocki\n
Mathias Bynens\n
mats cronqvist\n mats cronqvist\n
Matthew Beale\n Matthew Beale\n
Matthias Bussonnier\n
Matthias BUSSONNIER\n Matthias BUSSONNIER\n
Matt McDonald\n Matt McDonald\n
Matt Pass\n Matt Pass\n
Matt Sacks\n Matt Sacks\n
mauricio\n
Maximilian Hils\n Maximilian Hils\n
Maxim Kraev\n Maxim Kraev\n
Max Kirsch\n Max Kirsch\n
Max Xiantu\n
mbarkhau\n mbarkhau\n
Metatheos\n Metatheos\n
Micah Dubinko\n Micah Dubinko\n
...@@ -256,6 +321,7 @@ MinRK\n ...@@ -256,6 +321,7 @@ MinRK\n
Miraculix87\n Miraculix87\n
misfo\n misfo\n
mloginov\n mloginov\n
Moritz Schwörer\n
mps\n mps\n
mtaran-google\n mtaran-google\n
Narciso Jaramillo\n Narciso Jaramillo\n
...@@ -264,14 +330,25 @@ ndr\n ...@@ -264,14 +330,25 @@ ndr\n
nerbert\n nerbert\n
nextrevision\n nextrevision\n
nguillaumin\n nguillaumin\n
Ng Zhi An\n
Nicholas Bollweg\n Nicholas Bollweg\n
Nicholas Bollweg (Nick)\n
Nick Small\n
Niels van Groningen\n Niels van Groningen\n
nightwing\n
Nikita Beloglazov\n Nikita Beloglazov\n
Nikita Vasilyev\n Nikita Vasilyev\n
Nikolay Kostov\n Nikolay Kostov\n
nilp0inter\n
Nisarg Jhaveri\n
nlwillia\n nlwillia\n
Norman Rzepka\n
pablo\n pablo\n
Page\n Page\n
Panupong Pasupat\n
paris\n
Patil Arpith\n
Patrick Stoica\n
Patrick Strawderman\n Patrick Strawderman\n
Paul Garvin\n Paul Garvin\n
Paul Ivanov\n Paul Ivanov\n
...@@ -279,14 +356,21 @@ Pavel Feldman\n ...@@ -279,14 +356,21 @@ Pavel Feldman\n
Pavel Strashkin\n Pavel Strashkin\n
Paweł Bartkiewicz\n Paweł Bartkiewicz\n
peteguhl\n peteguhl\n
Peter Flynn\n
peterkroon\n peterkroon\n
Peter Kroon\n Peter Kroon\n
prasanthj\n prasanthj\n
Prasanth J\n Prasanth J\n
Radek Piórkowski\n
Rahul\n Rahul\n
Randall Mason\n
Randy Burden\n
Randy Edmunds\n Randy Edmunds\n
Rasmus Erik Voel Jensen\n Rasmus Erik Voel Jensen\n
Richard van der Meer\n
Richard Z.H. Wang\n Richard Z.H. Wang\n
Robert Crossfield\n
Roberto Abdelkader Martínez Pérez\n
robertop23\n robertop23\n
Robert Plummer\n Robert Plummer\n
Ruslan Osmanov\n Ruslan Osmanov\n
...@@ -294,11 +378,14 @@ Ryan Prior\n ...@@ -294,11 +378,14 @@ Ryan Prior\n
sabaca\n sabaca\n
Samuel Ainsworth\n Samuel Ainsworth\n
sandeepshetty\n sandeepshetty\n
Sander AKA Redsandro\n
santec\n santec\n
Sascha Peilicke\n Sascha Peilicke\n
satchmorun\n satchmorun\n
sathyamoorthi\n sathyamoorthi\n
SCLINIC\\jdecker\n SCLINIC\\jdecker\n
Scott Aikin\n
Scott Goodhew\n
Sebastian Zaha\n Sebastian Zaha\n
shaund\n shaund\n
shaun gilchrist\n shaun gilchrist\n
...@@ -306,9 +393,13 @@ Shawn A\n ...@@ -306,9 +393,13 @@ Shawn A\n
sheopory\n sheopory\n
Shiv Deepak\n Shiv Deepak\n
Shmuel Englard\n Shmuel Englard\n
Shubham Jain\n
silverwind\n
snasa\n
soliton4\n soliton4\n
sonson\n sonson\n
spastorelli\n spastorelli\n
srajanpaliwal\n
Stanislav Oaserele\n Stanislav Oaserele\n
Stas Kobzar\n Stas Kobzar\n
Stefan Borsje\n Stefan Borsje\n
...@@ -316,12 +407,15 @@ Steffen Beyer\n ...@@ -316,12 +407,15 @@ Steffen Beyer\n
Steve O\'Hara\n Steve O\'Hara\n
stoskov\n stoskov\n
Taha Jahangir\n Taha Jahangir\n
Takuji Shimokawa\n
Tarmil\n Tarmil\n
tfjgeorge\n tfjgeorge\n
Thaddee Tyl\n Thaddee Tyl\n
TheHowl\n
think\n think\n
Thomas Dvornik\n Thomas Dvornik\n
Thomas Schmid\n Thomas Schmid\n
Tim Alby\n
Tim Baumann\n Tim Baumann\n
Timothy Farrell\n Timothy Farrell\n
Timothy Hatcher\n Timothy Hatcher\n
...@@ -333,14 +427,20 @@ Tom MacWright\n ...@@ -333,14 +427,20 @@ Tom MacWright\n
Tony Jian\n Tony Jian\n
Travis Heppe\n Travis Heppe\n
Triangle717\n Triangle717\n
twifkak\n
Vestimir Markov\n Vestimir Markov\n
vf\n vf\n
Vincent Woo\n
Volker Mische\n Volker Mische\n
wenli\n wenli\n
Wesley Wiser\n Wesley Wiser\n
Will Binns-Smith\n
William Jamieson\n William Jamieson\n
William Stein\n
Willy\n
Wojtek Ptak\n Wojtek Ptak\n
Xavier Mendez\n Xavier Mendez\n
Yassin N. Hassan\n
YNH Webdev\n YNH Webdev\n
Yunchi Luo\n Yunchi Luo\n
Yuvi Panda\n Yuvi Panda\n
......
...@@ -33,17 +33,17 @@ ...@@ -33,17 +33,17 @@
## Getting help\n ## Getting help\n
\n \n
Community discussion, questions, and informal bug reporting is done on the\n Community discussion, questions, and informal bug reporting is done on the\n
[CodeMirror Google group](http://groups.google.com/group/codemirror).\n [discuss.CodeMirror forum](http://discuss.codemirror.net).\n
\n \n
## Submitting bug reports\n ## Submitting bug reports\n
\n \n
The preferred way to report bugs is to use the\n The preferred way to report bugs is to use the\n
[GitHub issue tracker](http://github.com/marijnh/CodeMirror/issues). Before\n [GitHub issue tracker](http://github.com/codemirror/CodeMirror/issues). Before\n
reporting a bug, read these pointers.\n reporting a bug, read these pointers.\n
\n \n
**Note:** The issue tracker is for *bugs*, not requests for help. Questions\n **Note:** The issue tracker is for *bugs*, not requests for help. Questions\n
should be asked on the\n should be asked on the\n
[CodeMirror Google group](http://groups.google.com/group/codemirror) instead.\n [discuss.CodeMirror forum](http://discuss.codemirror.net) instead.\n
\n \n
### Reporting bugs effectively\n ### Reporting bugs effectively\n
\n \n
...@@ -74,7 +74,7 @@ should be asked on the\n ...@@ -74,7 +74,7 @@ should be asked on the\n
## Contributing code\n ## Contributing code\n
\n \n
- Make sure you have a [GitHub Account](https://github.com/signup/free)\n - Make sure you have a [GitHub Account](https://github.com/signup/free)\n
- Fork [CodeMirror](https://github.com/marijnh/CodeMirror/)\n - Fork [CodeMirror](https://github.com/codemirror/CodeMirror/)\n
([how to fork a repo](https://help.github.com/articles/fork-a-repo))\n ([how to fork a repo](https://help.github.com/articles/fork-a-repo))\n
- Make your changes\n - Make your changes\n
- If your changes are easy to test or likely to regress, add tests.\n - If your changes are easy to test or likely to regress, add tests.\n
...@@ -96,6 +96,10 @@ should be asked on the\n ...@@ -96,6 +96,10 @@ should be asked on the\n
- Note that the linter (`bin/lint`) which is run after each commit\n - Note that the linter (`bin/lint`) which is run after each commit\n
complains about unused variables and functions. Prefix their names\n complains about unused variables and functions. Prefix their names\n
with an underscore to muffle it.\n with an underscore to muffle it.\n
\n
- CodeMirror does *not* follow JSHint or JSLint prescribed style.\n
Patches that try to \'fix\' code to pass one of these linters will be\n
unceremoniously discarded.\n
</string> </value> </string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<key> <string>raw</string> </key> <key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
Copyright (C) 2013 by Marijn Haverbeke <marijnh@gmail.com> and others\n Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others\n
\n \n
Permission is hereby granted, free of charge, to any person obtaining a copy\n Permission is hereby granted, free of charge, to any person obtaining a copy\n
of this software and associated documentation files (the "Software"), to deal\n of this software and associated documentation files (the "Software"), to deal\n
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<item> <item>
<key> <string>raw</string> </key> <key> <string>raw</string> </key>
<value> <string># CodeMirror\n <value> <string># CodeMirror\n
[![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror)\n [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror)\n
[![NPM version](https://badge.fury.io/js/codemirror.png)](http://badge.fury.io/js/codemirror)\n [![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)\n
\n \n
CodeMirror is a JavaScript component that provides a code editor in\n CodeMirror is a JavaScript component that provides a code editor in\n
the browser. When a mode is available for the language you are coding\n the browser. When a mode is available for the language you are coding\n
...@@ -34,7 +34,7 @@ in, it will color your code, and optionally help with indentation.\n ...@@ -34,7 +34,7 @@ in, it will color your code, and optionally help with indentation.\n
\n \n
The project page is http://codemirror.net \n The project page is http://codemirror.net \n
The manual is at http://codemirror.net/doc/manual.html \n The manual is at http://codemirror.net/doc/manual.html \n
The contributing guidelines are in [CONTRIBUTING.md](https://github.com/marijnh/CodeMirror/blob/master/CONTRIBUTING.md)\n The contributing guidelines are in [CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)\n
</string> </value> </string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.99</string> </value> <value> <string>ts21897117.58</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
var noOptions = {};\n var noOptions = {};\n
...@@ -35,8 +45,21 @@ ...@@ -35,8 +45,21 @@
}\n }\n
\n \n
CodeMirror.commands.toggleComment = function(cm) {\n CodeMirror.commands.toggleComment = function(cm) {\n
var from = cm.getCursor("start"), to = cm.getCursor("end");\n var minLine = Infinity, ranges = cm.listSelections(), mode = null;\n
cm.uncomment(from, to) || cm.lineComment(from, to);\n for (var i = ranges.length - 1; i >= 0; i--) {\n
var from = ranges[i].from(), to = ranges[i].to();\n
if (from.line >= minLine) continue;\n
if (to.line >= minLine) to = Pos(minLine, 0);\n
minLine = from.line;\n
if (mode == null) {\n
if (cm.uncomment(from, to)) mode = "un";\n
else { cm.lineComment(from, to); mode = "line"; }\n
} else if (mode == "un") {\n
cm.uncomment(from, to);\n
} else {\n
cm.lineComment(from, to);\n
}\n
}\n
};\n };\n
\n \n
CodeMirror.defineExtension("lineComment", function(from, to, options) {\n CodeMirror.defineExtension("lineComment", function(from, to, options) {\n
...@@ -110,7 +133,7 @@ ...@@ -110,7 +133,7 @@
CodeMirror.defineExtension("uncomment", function(from, to, options) {\n CodeMirror.defineExtension("uncomment", function(from, to, options) {\n
if (!options) options = noOptions;\n if (!options) options = noOptions;\n
var self = this, mode = self.getModeAt(from);\n var self = this, mode = self.getModeAt(from);\n
var end = Math.min(to.line, self.lastLine()), start = Math.min(from.line, end);\n var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);\n
\n \n
// Try finding line comments\n // Try finding line comments\n
var lineString = options.lineComment || mode.lineComment, lines = [];\n var lineString = options.lineComment || mode.lineComment, lines = [];\n
...@@ -153,6 +176,17 @@ ...@@ -153,6 +176,17 @@
!/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||\n !/comment/.test(self.getTokenTypeAt(Pos(start, open + 1))) ||\n
!/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))\n !/comment/.test(self.getTokenTypeAt(Pos(end, close + 1))))\n
return false;\n return false;\n
\n
// Avoid killing block comments completely outside the selection.\n
// Positions of the last startString before the start of the selection, and the first endString after it.\n
var lastStart = startLine.lastIndexOf(startString, from.ch);\n
var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);\n
if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;\n
// Positions of the first endString after the end of the selection, and the last startString before it.\n
firstEnd = endLine.indexOf(endString, to.ch);\n
var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);\n
lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;\n
if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;\n
\n \n
self.operation(function() {\n self.operation(function() {\n
self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),\n
...@@ -170,7 +204,7 @@ ...@@ -170,7 +204,7 @@
});\n });\n
return true;\n return true;\n
});\n });\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -181,7 +215,7 @@ ...@@ -181,7 +215,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>6207</int> </value> <value> <int>8008</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.86</string> </value> <value> <string>ts21897117.72</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,49 +22,67 @@ ...@@ -22,49 +22,67 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
var modes = ["clike", "css", "javascript"];\n var modes = ["clike", "css", "javascript"];\n
\n \n
for (var i = 0; i < modes.length; ++i)\n for (var i = 0; i < modes.length; ++i)\n
CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});\n CodeMirror.extendMode(modes[i], {blockCommentContinue: " * "});\n
\n \n
function continueComment(cm) {\n function continueComment(cm) {\n
var pos = cm.getCursor(), token = cm.getTokenAt(pos);\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
if (token.type != "comment" || cm.getOption("disableInput")) return CodeMirror.Pass;\n var ranges = cm.listSelections(), mode, inserts = [];\n
var mode = CodeMirror.innerMode(cm.getMode(), token.state).mode;\n for (var i = 0; i < ranges.length; i++) {\n
var pos = ranges[i].head, token = cm.getTokenAt(pos);\n
if (token.type != "comment") return CodeMirror.Pass;\n
var modeHere = CodeMirror.innerMode(cm.getMode(), token.state).mode;\n
if (!mode) mode = modeHere;\n
else if (mode != modeHere) return CodeMirror.Pass;\n
\n \n
var insert;\n var insert = null;\n
if (mode.blockCommentStart && mode.blockCommentContinue) {\n if (mode.blockCommentStart && mode.blockCommentContinue) {\n
var end = token.string.indexOf(mode.blockCommentEnd);\n var end = token.string.indexOf(mode.blockCommentEnd);\n
var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;\n var full = cm.getRange(CodeMirror.Pos(pos.line, 0), CodeMirror.Pos(pos.line, token.end)), found;\n
if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {\n if (end != -1 && end == token.string.length - mode.blockCommentEnd.length && pos.ch >= end) {\n
// Comment ended, don\'t continue it\n // Comment ended, don\'t continue it\n
} else if (token.string.indexOf(mode.blockCommentStart) == 0) {\n } else if (token.string.indexOf(mode.blockCommentStart) == 0) {\n
insert = full.slice(0, token.start);\n insert = full.slice(0, token.start);\n
if (!/^\\s*$/.test(insert)) {\n if (!/^\\s*$/.test(insert)) {\n
insert = "";\n insert = "";\n
for (var i = 0; i < token.start; ++i) insert += " ";\n for (var j = 0; j < token.start; ++j) insert += " ";\n
}\n
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&\n
found + mode.blockCommentContinue.length > token.start &&\n
/^\\s*$/.test(full.slice(0, found))) {\n
insert = full.slice(0, found);\n
}\n }\n
} else if ((found = full.indexOf(mode.blockCommentContinue)) != -1 &&\n if (insert != null) insert += mode.blockCommentContinue;\n
found + mode.blockCommentContinue.length > token.start &&\n
/^\\s*$/.test(full.slice(0, found))) {\n
insert = full.slice(0, found);\n
}\n }\n
if (insert != null) insert += mode.blockCommentContinue;\n if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {\n
}\n var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);\n
if (insert == null && mode.lineComment && continueLineCommentEnabled(cm)) {\n if (found > -1) {\n
var line = cm.getLine(pos.line), found = line.indexOf(mode.lineComment);\n insert = line.slice(0, found);\n
if (found > -1) {\n if (/\\S/.test(insert)) insert = null;\n
insert = line.slice(0, found);\n else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\\s*/)[0];\n
if (/\\S/.test(insert)) insert = null;\n }\n
else insert += mode.lineComment + line.slice(found + mode.lineComment.length).match(/^\\s*/)[0];\n
}\n }\n
if (insert == null) return CodeMirror.Pass;\n
inserts[i] = "\\n" + insert;\n
}\n }\n
\n \n
if (insert != null)\n cm.operation(function() {\n
cm.replaceSelection("\\n" + insert, "end");\n for (var i = ranges.length - 1; i >= 0; i--)\n
else\n cm.replaceRange(inserts[i], ranges[i].from(), ranges[i].to(), "+insert");\n
return CodeMirror.Pass;\n });\n
}\n }\n
\n \n
function continueLineCommentEnabled(cm) {\n function continueLineCommentEnabled(cm) {\n
...@@ -88,7 +106,7 @@ ...@@ -88,7 +106,7 @@
cm.addKeyMap(map);\n cm.addKeyMap(map);\n
}\n }\n
});\n });\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -99,7 +117,7 @@ ...@@ -99,7 +117,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2529</int> </value> <value> <int>3399</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403073.64</string> </value> <value> <string>ts21897119.98</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,18 +22,28 @@ ...@@ -22,18 +22,28 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
// Open simple dialogs on top of an editor. Relies on dialog.css.\n // Open simple dialogs on top of an editor. Relies on dialog.css.\n
\n \n
(function() {\n (function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
function dialogDiv(cm, template, bottom) {\n function dialogDiv(cm, template, bottom) {\n
var wrap = cm.getWrapperElement();\n var wrap = cm.getWrapperElement();\n
var dialog;\n var dialog;\n
dialog = wrap.appendChild(document.createElement("div"));\n dialog = wrap.appendChild(document.createElement("div"));\n
if (bottom) {\n if (bottom)\n
dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";\n dialog.className = "CodeMirror-dialog CodeMirror-dialog-bottom";\n
} else {\n else\n
dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";\n dialog.className = "CodeMirror-dialog CodeMirror-dialog-top";\n
}\n \n
if (typeof template == "string") {\n if (typeof template == "string") {\n
dialog.innerHTML = template;\n dialog.innerHTML = template;\n
} else { // Assuming it\'s a detached DOM element.\n } else { // Assuming it\'s a detached DOM element.\n
...@@ -49,40 +59,59 @@ ...@@ -49,40 +59,59 @@
}\n }\n
\n \n
CodeMirror.defineExtension("openDialog", function(template, callback, options) {\n CodeMirror.defineExtension("openDialog", function(template, callback, options) {\n
if (!options) options = {};\n
\n
closeNotification(this, null);\n closeNotification(this, null);\n
var dialog = dialogDiv(this, template, options && options.bottom);\n \n
var dialog = dialogDiv(this, template, options.bottom);\n
var closed = false, me = this;\n var closed = false, me = this;\n
function close() {\n function close(newVal) {\n
if (closed) return;\n if (typeof newVal == \'string\') {\n
closed = true;\n inp.value = newVal;\n
dialog.parentNode.removeChild(dialog);\n } else {\n
if (closed) return;\n
closed = true;\n
dialog.parentNode.removeChild(dialog);\n
me.focus();\n
\n
if (options.onClose) options.onClose(dialog);\n
}\n
}\n }\n
\n
var inp = dialog.getElementsByTagName("input")[0], button;\n var inp = dialog.getElementsByTagName("input")[0], button;\n
if (inp) {\n if (inp) {\n
if (options && options.value) inp.value = options.value;\n if (options.value) {\n
inp.value = options.value;\n
inp.select();\n
}\n
\n
if (options.onInput)\n
CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});\n
if (options.onKeyUp)\n
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});\n
\n
CodeMirror.on(inp, "keydown", function(e) {\n CodeMirror.on(inp, "keydown", function(e) {\n
if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }\n
if (e.keyCode == 13 || e.keyCode == 27) {\n if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {\n
inp.blur();\n inp.blur();\n
CodeMirror.e_stop(e);\n CodeMirror.e_stop(e);\n
close();\n close();\n
me.focus();\n
if (e.keyCode == 13) callback(inp.value);\n
}\n }\n
if (e.keyCode == 13) callback(inp.value, e);\n
});\n });\n
if (options && options.onKeyUp) {\n \n
CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});\n if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);\n
}\n \n
if (options && options.value) inp.value = options.value;\n
inp.focus();\n inp.focus();\n
CodeMirror.on(inp, "blur", close);\n
} else if (button = dialog.getElementsByTagName("button")[0]) {\n } else if (button = dialog.getElementsByTagName("button")[0]) {\n
CodeMirror.on(button, "click", function() {\n CodeMirror.on(button, "click", function() {\n
close();\n close();\n
me.focus();\n me.focus();\n
});\n });\n
\n
if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);\n
\n
button.focus();\n button.focus();\n
CodeMirror.on(button, "blur", close);\n
}\n }\n
return close;\n return close;\n
});\n });\n
...@@ -127,8 +156,8 @@ ...@@ -127,8 +156,8 @@
CodeMirror.defineExtension("openNotification", function(template, options) {\n CodeMirror.defineExtension("openNotification", function(template, options) {\n
closeNotification(this, close);\n closeNotification(this, close);\n
var dialog = dialogDiv(this, template, options && options.bottom);\n var dialog = dialogDiv(this, template, options && options.bottom);\n
var duration = options && (options.duration === undefined ? 5000 : options.duration);\n
var closed = false, doneTimer;\n var closed = false, doneTimer;\n
var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;\n
\n \n
function close() {\n function close() {\n
if (closed) return;\n if (closed) return;\n
...@@ -141,10 +170,13 @@ ...@@ -141,10 +170,13 @@
CodeMirror.e_preventDefault(e);\n CodeMirror.e_preventDefault(e);\n
close();\n close();\n
});\n });\n
\n
if (duration)\n if (duration)\n
doneTimer = setTimeout(close, options.duration);\n doneTimer = setTimeout(close, duration);\n
\n
return close;\n
});\n });\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -155,7 +187,7 @@ ...@@ -155,7 +187,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>4087</int> </value> <value> <int>4875</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.22</string> </value> <value> <string>ts21897117.34</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -20,7 +20,19 @@ ...@@ -20,7 +20,19 @@
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>(function() {\n <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {\n CodeMirror.defineOption("fullScreen", false, function(cm, val, old) {\n
...@@ -50,8 +62,10 @@ ...@@ -50,8 +62,10 @@
window.scrollTo(info.scrollLeft, info.scrollTop);\n window.scrollTo(info.scrollLeft, info.scrollTop);\n
cm.refresh();\n cm.refresh();\n
}\n }\n
})();\n });\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -59,7 +73,7 @@ ...@@ -59,7 +73,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1069</int> </value> <value> <int>1494</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21897117.22</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>panel.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
CodeMirror.defineExtension("addPanel", function(node, options) {\n
if (!this.state.panels) initPanels(this);\n
\n
var info = this.state.panels;\n
if (options && options.position == "bottom")\n
info.wrapper.appendChild(node);\n
else\n
info.wrapper.insertBefore(node, info.wrapper.firstChild);\n
var height = (options && options.height) || node.offsetHeight;\n
this._setSize(null, info.heightLeft -= height);\n
info.panels++;\n
return new Panel(this, node, options, height);\n
});\n
\n
function Panel(cm, node, options, height) {\n
this.cm = cm;\n
this.node = node;\n
this.options = options;\n
this.height = height;\n
this.cleared = false;\n
}\n
\n
Panel.prototype.clear = function() {\n
if (this.cleared) return;\n
this.cleared = true;\n
var info = this.cm.state.panels;\n
this.cm._setSize(null, info.heightLeft += this.height);\n
info.wrapper.removeChild(this.node);\n
if (--info.panels == 0) removePanels(this.cm);\n
};\n
\n
Panel.prototype.changed = function(height) {\n
var newHeight = height == null ? this.node.offsetHeight : height;\n
var info = this.cm.state.panels;\n
this.cm._setSize(null, info.height += (newHeight - this.height));\n
this.height = newHeight;\n
};\n
\n
function initPanels(cm) {\n
var wrap = cm.getWrapperElement();\n
var style = window.getComputedStyle ? window.getComputedStyle(wrap) : wrap.currentStyle;\n
var height = parseInt(style.height);\n
var info = cm.state.panels = {\n
setHeight: wrap.style.height,\n
heightLeft: height,\n
panels: 0,\n
wrapper: document.createElement("div")\n
};\n
wrap.parentNode.insertBefore(info.wrapper, wrap);\n
var hasFocus = cm.hasFocus();\n
info.wrapper.appendChild(wrap);\n
if (hasFocus) cm.focus();\n
\n
cm._setSize = cm.setSize;\n
if (height != null) cm.setSize = function(width, newHeight) {\n
if (newHeight == null) return this._setSize(width, newHeight);\n
info.setHeight = newHeight;\n
if (typeof newHeight != "number") {\n
var px = /^(\\d+\\.?\\d*)px$/.exec(newHeight);\n
if (px) {\n
newHeight = Number(px[1]);\n
} else {\n
info.wrapper.style.height = newHeight;\n
newHeight = info.wrapper.offsetHeight;\n
info.wrapper.style.height = "";\n
}\n
}\n
cm._setSize(width, info.heightLeft += (newHeight - height));\n
height = newHeight;\n
};\n
}\n
\n
function removePanels(cm) {\n
var info = cm.state.panels;\n
cm.state.panels = null;\n
\n
var wrap = cm.getWrapperElement();\n
info.wrapper.parentNode.replaceChild(wrap, info.wrapper);\n
wrap.style.height = info.setHeight;\n
cm.setSize = cm._setSize;\n
cm.setSize();\n
}\n
});\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3102</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.53</string> </value> <value> <string>ts21897116.97</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
CodeMirror.defineOption("placeholder", "", function(cm, val, old) {\n CodeMirror.defineOption("placeholder", "", function(cm, val, old) {\n
var prev = old && old != CodeMirror.Init;\n var prev = old && old != CodeMirror.Init;\n
if (val && !prev) {\n if (val && !prev) {\n
...@@ -69,7 +79,7 @@ ...@@ -69,7 +79,7 @@
function isEmpty(cm) {\n function isEmpty(cm) {\n
return (cm.lineCount() === 1) && (cm.getLine(0) === "");\n return (cm.lineCount() === 1) && (cm.getLine(0) === "");\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -80,7 +90,7 @@ ...@@ -80,7 +90,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1546</int> </value> <value> <int>1971</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.09</string> </value> <value> <string>ts21897117.47</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
CodeMirror.defineOption("rulers", false, function(cm, val, old) {\n CodeMirror.defineOption("rulers", false, function(cm, val, old) {\n
...@@ -48,18 +58,25 @@ ...@@ -48,18 +58,25 @@
var val = cm.getOption("rulers");\n var val = cm.getOption("rulers");\n
var cw = cm.defaultCharWidth();\n var cw = cm.defaultCharWidth();\n
var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;\n var left = cm.charCoords(CodeMirror.Pos(cm.firstLine(), 0), "div").left;\n
var bot = -cm.display.scroller.offsetHeight;\n var minH = cm.display.scroller.offsetHeight + 30;\n
for (var i = 0; i < val.length; i++) {\n for (var i = 0; i < val.length; i++) {\n
var elt = document.createElement("div");\n var elt = document.createElement("div");\n
var col, cls = null;\n elt.className = "CodeMirror-ruler";\n
if (typeof val[i] == "number") {\n var col, cls = null, conf = val[i];\n
col = val[i];\n if (typeof conf == "number") {\n
col = conf;\n
} else {\n } else {\n
col = val[i].column;\n col = conf.column;\n
if (conf.className) elt.className += " " + conf.className;\n
if (conf.color) elt.style.borderColor = conf.color;\n
if (conf.lineStyle) elt.style.borderLeftStyle = conf.lineStyle;\n
if (conf.width) elt.style.borderLeftWidth = conf.width;\n
cls = val[i].className;\n cls = val[i].className;\n
}\n }\n
elt.className = "CodeMirror-ruler" + (cls ? " " + cls : "");\n elt.style.left = (left + col * cw) + "px";\n
elt.style.cssText = "left: " + (left + col * cw) + "px; top: -50px; bottom: " + bot + "px";\n elt.style.top = "-50px";\n
elt.style.bottom = "-20px";\n
elt.style.minHeight = minH + "px";\n
cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);\n cm.display.lineSpace.insertBefore(elt, cm.display.cursorDiv);\n
}\n }\n
}\n }\n
...@@ -68,7 +85,7 @@ ...@@ -68,7 +85,7 @@
clearRulers(cm);\n clearRulers(cm);\n
setRulers(cm);\n setRulers(cm);\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -79,7 +96,7 @@ ...@@ -79,7 +96,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1400</int> </value> <value> <int>2134</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.33</string> </value> <value> <string>ts21897295.56</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,10 +22,22 @@ ...@@ -22,10 +22,22 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
var DEFAULT_BRACKETS = "()[]{}\'\'\\"\\"";\n var DEFAULT_BRACKETS = "()[]{}\'\'\\"\\"";\n
var DEFAULT_EXPLODE_ON_ENTER = "[]{}";\n var DEFAULT_EXPLODE_ON_ENTER = "[]{}";\n
var SPACE_CHAR_REGEX = /\\s/;\n var SPACE_CHAR_REGEX = /\\s/;\n
\n
var Pos = CodeMirror.Pos;\n
\n \n
CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {\n CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) {\n
if (old != CodeMirror.Init && old)\n if (old != CodeMirror.Init && old)\n
...@@ -43,69 +55,132 @@ ...@@ -43,69 +55,132 @@
});\n });\n
\n \n
function charsAround(cm, pos) {\n function charsAround(cm, pos) {\n
var str = cm.getRange(CodeMirror.Pos(pos.line, pos.ch - 1),\n var str = cm.getRange(Pos(pos.line, pos.ch - 1),\n
CodeMirror.Pos(pos.line, pos.ch + 1));\n Pos(pos.line, pos.ch + 1));\n
return str.length == 2 ? str : null;\n return str.length == 2 ? str : null;\n
}\n }\n
\n
// Project the token type that will exists after the given char is\n
// typed, and use it to determine whether it would cause the start\n
// of a string token.\n
function enteringString(cm, pos, ch) {\n
var line = cm.getLine(pos.line);\n
var token = cm.getTokenAt(pos);\n
if (/\\bstring2?\\b/.test(token.type)) return false;\n
var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4);\n
stream.pos = stream.start = token.start;\n
for (;;) {\n
var type1 = cm.getMode().token(stream, token.state);\n
if (stream.pos >= pos.ch + 1) return /\\bstring2?\\b/.test(type1);\n
stream.start = stream.pos;\n
}\n
}\n
\n \n
function buildKeymap(pairs) {\n function buildKeymap(pairs) {\n
var map = {\n var map = {\n
name : "autoCloseBrackets",\n name : "autoCloseBrackets",\n
Backspace: function(cm) {\n Backspace: function(cm) {\n
if (cm.somethingSelected() || cm.getOption("disableInput")) return CodeMirror.Pass;\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
var cur = cm.getCursor(), around = charsAround(cm, cur);\n var ranges = cm.listSelections();\n
if (around && pairs.indexOf(around) % 2 == 0)\n for (var i = 0; i < ranges.length; i++) {\n
cm.replaceRange("", CodeMirror.Pos(cur.line, cur.ch - 1), CodeMirror.Pos(cur.line, cur.ch + 1));\n if (!ranges[i].empty()) return CodeMirror.Pass;\n
else\n var around = charsAround(cm, ranges[i].head);\n
return CodeMirror.Pass;\n if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n
}\n
for (var i = ranges.length - 1; i >= 0; i--) {\n
var cur = ranges[i].head;\n
cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));\n
}\n
}\n }\n
};\n };\n
var closingBrackets = "";\n var closingBrackets = "";\n
for (var i = 0; i < pairs.length; i += 2) (function(left, right) {\n for (var i = 0; i < pairs.length; i += 2) (function(left, right) {\n
if (left != right) closingBrackets += right;\n closingBrackets += right;\n
function surround(cm) {\n
var selection = cm.getSelection();\n
cm.replaceSelection(left + selection + right);\n
}\n
function maybeOverwrite(cm) {\n
var cur = cm.getCursor(), ahead = cm.getRange(cur, CodeMirror.Pos(cur.line, cur.ch + 1));\n
if (ahead != right || cm.somethingSelected()) return CodeMirror.Pass;\n
else cm.execCommand("goCharRight");\n
}\n
map["\'" + left + "\'"] = function(cm) {\n map["\'" + left + "\'"] = function(cm) {\n
if (left == "\'" && cm.getTokenAt(cm.getCursor()).type == "comment" ||\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
cm.getOption("disableInput"))\n var ranges = cm.listSelections(), type, next;\n
return CodeMirror.Pass;\n for (var i = 0; i < ranges.length; i++) {\n
if (cm.somethingSelected()) return surround(cm);\n var range = ranges[i], cur = range.head, curType;\n
if (left == right && maybeOverwrite(cm) != CodeMirror.Pass) return;\n var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1));\n
var cur = cm.getCursor(), ahead = CodeMirror.Pos(cur.line, cur.ch + 1);\n if (!range.empty()) {\n
var line = cm.getLine(cur.line), nextChar = line.charAt(cur.ch), curChar = cur.ch > 0 ? line.charAt(cur.ch - 1) : "";\n curType = "surround";\n
if (left == right && CodeMirror.isWordChar(curChar))\n } else if (left == right && next == right) {\n
return CodeMirror.Pass;\n if (cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == left + left + left)\n
if (line.length == cur.ch || closingBrackets.indexOf(nextChar) >= 0 || SPACE_CHAR_REGEX.test(nextChar))\n curType = "skipThree";\n
cm.replaceSelection(left + right, {head: ahead, anchor: ahead});\n else\n
else\n curType = "skip";\n
return CodeMirror.Pass;\n } else if (left == right && cur.ch > 1 &&\n
cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left &&\n
(cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) {\n
curType = "addFour";\n
} else if (left == \'"\' || left == "\'") {\n
if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, left)) curType = "both";\n
else return CodeMirror.Pass;\n
} else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) {\n
curType = "both";\n
} else {\n
return CodeMirror.Pass;\n
}\n
if (!type) type = curType;\n
else if (type != curType) return CodeMirror.Pass;\n
}\n
\n
cm.operation(function() {\n
if (type == "skip") {\n
cm.execCommand("goCharRight");\n
} else if (type == "skipThree") {\n
for (var i = 0; i < 3; i++)\n
cm.execCommand("goCharRight");\n
} else if (type == "surround") {\n
var sels = cm.getSelections();\n
for (var i = 0; i < sels.length; i++)\n
sels[i] = left + sels[i] + right;\n
cm.replaceSelections(sels, "around");\n
} else if (type == "both") {\n
cm.replaceSelection(left + right, null);\n
cm.execCommand("goCharLeft");\n
} else if (type == "addFour") {\n
cm.replaceSelection(left + left + left + left, "before");\n
cm.execCommand("goCharRight");\n
}\n
});\n
};\n
if (left != right) map["\'" + right + "\'"] = function(cm) {\n
var ranges = cm.listSelections();\n
for (var i = 0; i < ranges.length; i++) {\n
var range = ranges[i];\n
if (!range.empty() ||\n
cm.getRange(range.head, Pos(range.head.line, range.head.ch + 1)) != right)\n
return CodeMirror.Pass;\n
}\n
cm.execCommand("goCharRight");\n
};\n };\n
if (left != right) map["\'" + right + "\'"] = maybeOverwrite;\n
})(pairs.charAt(i), pairs.charAt(i + 1));\n })(pairs.charAt(i), pairs.charAt(i + 1));\n
return map;\n return map;\n
}\n }\n
\n \n
function buildExplodeHandler(pairs) {\n function buildExplodeHandler(pairs) {\n
return function(cm) {\n return function(cm) {\n
var cur = cm.getCursor(), around = charsAround(cm, cur);\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
if (!around || pairs.indexOf(around) % 2 != 0 || cm.getOption("disableInput"))\n var ranges = cm.listSelections();\n
return CodeMirror.Pass;\n for (var i = 0; i < ranges.length; i++) {\n
if (!ranges[i].empty()) return CodeMirror.Pass;\n
var around = charsAround(cm, ranges[i].head);\n
if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass;\n
}\n
cm.operation(function() {\n cm.operation(function() {\n
var newPos = CodeMirror.Pos(cur.line + 1, 0);\n cm.replaceSelection("\\n\\n", null);\n
cm.replaceSelection("\\n\\n", {anchor: newPos, head: newPos}, "+input");\n cm.execCommand("goCharLeft");\n
cm.indentLine(cur.line + 1, null, true);\n ranges = cm.listSelections();\n
cm.indentLine(cur.line + 2, null, true);\n for (var i = 0; i < ranges.length; i++) {\n
var line = ranges[i].head.line;\n
cm.indentLine(line, null, true);\n
cm.indentLine(line + 1, null, true);\n
}\n
});\n });\n
};\n };\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -116,7 +191,7 @@ ...@@ -116,7 +191,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3497</int> </value> <value> <int>6302</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.5</string> </value> <value> <string>ts21897295.63</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
/**\n /**\n
* Tag-closer extension for CodeMirror.\n * Tag-closer extension for CodeMirror.\n
*\n *\n
...@@ -46,7 +49,14 @@ ...@@ -46,7 +49,14 @@
* See demos/closetag.html for a usage example.\n * See demos/closetag.html for a usage example.\n
*/\n */\n
\n \n
(function() {\n (function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), require("../fold/xml-fold"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror", "../fold/xml-fold"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {\n CodeMirror.defineOption("autoCloseTags", false, function(cm, val, old) {\n
if (old != CodeMirror.Init && old)\n if (old != CodeMirror.Init && old)\n
cm.removeKeyMap("autoCloseTags");\n cm.removeKeyMap("autoCloseTags");\n
...@@ -65,48 +75,82 @@ ...@@ -65,48 +75,82 @@
"h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];\n "h5", "h6", "head", "html", "iframe", "layer", "legend", "object", "ol", "p", "select", "table", "ul"];\n
\n \n
function autoCloseGT(cm) {\n function autoCloseGT(cm) {\n
var pos = cm.getCursor(), tok = cm.getTokenAt(pos);\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n var ranges = cm.listSelections(), replacements = [];\n
if (inner.mode.name != "xml" || !state.tagName || cm.getOption("disableInput")) return CodeMirror.Pass;\n for (var i = 0; i < ranges.length; i++) {\n
if (!ranges[i].empty()) return CodeMirror.Pass;\n
var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n
if (inner.mode.name != "xml" || !state.tagName) return CodeMirror.Pass;\n
\n
var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html";\n
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);\n
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);\n
\n \n
var opt = cm.getOption("autoCloseTags"), html = inner.mode.configuration == "html";\n var tagName = state.tagName;\n
var dontCloseTags = (typeof opt == "object" && opt.dontCloseTags) || (html && htmlDontClose);\n if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n
var indentTags = (typeof opt == "object" && opt.indentTags) || (html && htmlIndent);\n var lowerTagName = tagName.toLowerCase();\n
// Don\'t process the \'>\' at the end of an end-tag or self-closing tag\n
if (!tagName ||\n
tok.type == "string" && (tok.end != pos.ch || !/[\\"\\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n
tok.type == "tag" && state.type == "closeTag" ||\n
tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />\n
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n
closingTagExists(cm, tagName, pos, state, true))\n
return CodeMirror.Pass;\n
\n \n
var tagName = state.tagName;\n var indent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n
if (tok.end > pos.ch) tagName = tagName.slice(0, tagName.length - tok.end + pos.ch);\n replacements[i] = {indent: indent,\n
var lowerTagName = tagName.toLowerCase();\n text: ">" + (indent ? "\\n\\n" : "") + "</" + tagName + ">",\n
// Don\'t process the \'>\' at the end of an end-tag or self-closing tag\n newPos: indent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1)};\n
if (!tagName ||\n }\n
tok.type == "string" && (tok.end != pos.ch || !/[\\"\\\']/.test(tok.string.charAt(tok.string.length - 1)) || tok.string.length == 1) ||\n
tok.type == "tag" && state.type == "closeTag" ||\n
tok.string.indexOf("/") == (tok.string.length - 1) || // match something like <someTagName />\n
dontCloseTags && indexOf(dontCloseTags, lowerTagName) > -1 ||\n
CodeMirror.scanForClosingTag && CodeMirror.scanForClosingTag(cm, pos, tagName,\n
Math.min(cm.lastLine() + 1, pos.line + 50)))\n
return CodeMirror.Pass;\n
\n \n
var doIndent = indentTags && indexOf(indentTags, lowerTagName) > -1;\n for (var i = ranges.length - 1; i >= 0; i--) {\n
var curPos = doIndent ? CodeMirror.Pos(pos.line + 1, 0) : CodeMirror.Pos(pos.line, pos.ch + 1);\n var info = replacements[i];\n
cm.replaceSelection(">" + (doIndent ? "\\n\\n" : "") + "</" + tagName + ">",\n cm.replaceRange(info.text, ranges[i].head, ranges[i].anchor, "+insert");\n
{head: curPos, anchor: curPos});\n var sel = cm.listSelections().slice(0);\n
if (doIndent) {\n sel[i] = {head: info.newPos, anchor: info.newPos};\n
cm.indentLine(pos.line + 1, null, true);\n cm.setSelections(sel);\n
cm.indentLine(pos.line + 2, null);\n if (info.indent) {\n
cm.indentLine(info.newPos.line, null, true);\n
cm.indentLine(info.newPos.line + 1, null, true);\n
}\n
}\n }\n
}\n }\n
\n \n
function autoCloseSlash(cm) {\n function autoCloseSlash(cm) {\n
var pos = cm.getCursor(), tok = cm.getTokenAt(pos);\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n var ranges = cm.listSelections(), replacements = [];\n
if (tok.type == "string" || tok.string.charAt(0) != "<" ||\n for (var i = 0; i < ranges.length; i++) {\n
tok.start != pos.ch - 1 || inner.mode.name != "xml" ||\n if (!ranges[i].empty()) return CodeMirror.Pass;\n
cm.getOption("disableInput"))\n var pos = ranges[i].head, tok = cm.getTokenAt(pos);\n
return CodeMirror.Pass;\n var inner = CodeMirror.innerMode(cm.getMode(), tok.state), state = inner.state;\n
\n if (tok.type == "string" || tok.string.charAt(0) != "<" ||\n
var tagName = state.context && state.context.tagName;\n tok.start != pos.ch - 1)\n
if (tagName) cm.replaceSelection("/" + tagName + ">", "end");\n return CodeMirror.Pass;\n
else return CodeMirror.Pass;\n // Kludge to get around the fact that we are not in XML mode\n
// when completing in JS/CSS snippet in htmlmixed mode. Does not\n
// work for other XML embedded languages (there is no general\n
// way to go from a mixed mode to its current XML state).\n
if (inner.mode.name != "xml") {\n
if (cm.getMode().name == "htmlmixed" && inner.mode.name == "javascript")\n
replacements[i] = "/script>";\n
else if (cm.getMode().name == "htmlmixed" && inner.mode.name == "css")\n
replacements[i] = "/style>";\n
else\n
return CodeMirror.Pass;\n
} else {\n
if (!state.context || !state.context.tagName ||\n
closingTagExists(cm, state.context.tagName, pos, state))\n
return CodeMirror.Pass;\n
replacements[i] = "/" + state.context.tagName + ">";\n
}\n
}\n
cm.replaceSelections(replacements);\n
ranges = cm.listSelections();\n
for (var i = 0; i < ranges.length; i++)\n
if (i == ranges.length - 1 || ranges[i].head.line < ranges[i + 1].head.line)\n
cm.indentLine(ranges[i].head.line);\n
}\n }\n
\n \n
function indexOf(collection, elt) {\n function indexOf(collection, elt) {\n
...@@ -115,7 +159,28 @@ ...@@ -115,7 +159,28 @@
if (collection[i] == elt) return i;\n if (collection[i] == elt) return i;\n
return -1;\n return -1;\n
}\n }\n
})();\n \n
// If xml-fold is loaded, we use its functionality to try and verify\n
// whether a given tag is actually unclosed.\n
function closingTagExists(cm, tagName, pos, state, newTag) {\n
if (!CodeMirror.scanForClosingTag) return false;\n
var end = Math.min(cm.lastLine() + 1, pos.line + 500);\n
var nextClose = CodeMirror.scanForClosingTag(cm, pos, null, end);\n
if (!nextClose || nextClose.tag != tagName) return false;\n
var cx = state.context;\n
// If the immediate wrapping context contains onCx instances of\n
// the same tag, a closing tag only exists if there are at least\n
// that many closing tags of that type following.\n
for (var onCx = newTag ? 1 : 0; cx && cx.tagName == tagName; cx = cx.prev) ++onCx;\n
pos = nextClose.to;\n
for (var i = 1; i < onCx; i++) {\n
var next = CodeMirror.scanForClosingTag(cm, pos, null, end);\n
if (!next || next.tag != tagName) return false;\n
pos = next.to;\n
}\n
return true;\n
}\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -126,7 +191,7 @@ ...@@ -126,7 +191,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>4385</int> </value> <value> <int>7331</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.61</string> </value> <value> <string>ts21897295.78</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,33 +22,57 @@ ...@@ -22,33 +22,57 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
\'use strict\';\n // Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n \n
var listRE = /^(\\s*)([*+-]|(\\d+)\\.)(\\s*)/,\n (function(mod) {\n
unorderedBullets = \'*+-\';\n if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
var listRE = /^(\\s*)(>[> ]*|[*+-]\\s|(\\d+)\\.)(\\s*)/,\n
emptyListRE = /^(\\s*)(>[> ]*|[*+-]|(\\d+)\\.)(\\s*)$/,\n
unorderedListRE = /[*+-]\\s/;\n
\n \n
CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n CodeMirror.commands.newlineAndIndentContinueMarkdownList = function(cm) {\n
if (cm.getOption("disableInput")) return CodeMirror.Pass;\n if (cm.getOption("disableInput")) return CodeMirror.Pass;\n
var ranges = cm.listSelections(), replacements = [];\n
for (var i = 0; i < ranges.length; i++) {\n
var pos = ranges[i].head, match;\n
var eolState = cm.getStateAfter(pos.line);\n
var inList = eolState.list !== false;\n
var inQuote = eolState.quote !== false;\n
\n \n
var pos = cm.getCursor(),\n if (!ranges[i].empty() || (!inList && !inQuote) || !(match = cm.getLine(pos.line).match(listRE))) {\n
inList = cm.getStateAfter(pos.line).list !== false,\n cm.execCommand("newlineAndIndent");\n
match;\n return;\n
}\n
if (cm.getLine(pos.line).match(emptyListRE)) {\n
cm.replaceRange("", {\n
line: pos.line, ch: 0\n
}, {\n
line: pos.line, ch: pos.ch + 1\n
});\n
replacements[i] = "\\n";\n
\n \n
if (!inList || !(match = cm.getLine(pos.line).match(listRE))) {\n } else {\n
cm.execCommand(\'newlineAndIndent\');\n var indent = match[1], after = match[4];\n
return;\n var bullet = unorderedListRE.test(match[2]) || match[2].indexOf(">") >= 0\n
}\n ? match[2]\n
: (parseInt(match[3], 10) + 1) + ".";\n
\n \n
var indent = match[1], after = match[4];\n replacements[i] = "\\n" + indent + bullet + after;\n
var bullet = unorderedBullets.indexOf(match[2]) >= 0\n }\n
? match[2]\n }\n
: (parseInt(match[3], 10) + 1) + \'.\';\n
\n \n
cm.replaceSelection(\'\\n\' + indent + bullet + after, \'end\');\n cm.replaceSelections(replacements);\n
};\n };\n
\n });\n
}());\n
]]></string> </value> ]]></string> </value>
...@@ -59,7 +83,7 @@ ...@@ -59,7 +83,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>725</int> </value> <value> <int>1752</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.7</string> </value> <value> <string>ts21897295.92</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,76 +22,106 @@ ...@@ -22,76 +22,106 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n var ie_lt8 = /MSIE \\d/.test(navigator.userAgent) &&\n
(document.documentMode == null || document.documentMode < 8);\n (document.documentMode == null || document.documentMode < 8);\n
\n \n
var Pos = CodeMirror.Pos;\n var Pos = CodeMirror.Pos;\n
\n \n
var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};\n var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};\n
function findMatchingBracket(cm, where, strict) {\n
var state = cm.state.matchBrackets;\n
var maxScanLen = (state && state.maxScanLineLength) || 10000;\n
var maxScanLines = (state && state.maxScanLines) || 100;\n
\n \n
var cur = where || cm.getCursor(), line = cm.getLineHandle(cur.line), pos = cur.ch - 1;\n function findMatchingBracket(cm, where, strict, config) {\n
var line = cm.getLineHandle(where.line), pos = where.ch - 1;\n
var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];\n
if (!match) return null;\n if (!match) return null;\n
var forward = match.charAt(1) == ">", d = forward ? 1 : -1;\n var dir = match.charAt(1) == ">" ? 1 : -1;\n
if (strict && forward != (pos == cur.ch)) return null;\n if (strict && (dir > 0) != (pos == where.ch)) return null;\n
var style = cm.getTokenTypeAt(Pos(cur.line, pos + 1));\n var style = cm.getTokenTypeAt(Pos(where.line, pos + 1));\n
\n
var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config);\n
if (found == null) return null;\n
return {from: Pos(where.line, pos), to: found && found.pos,\n
match: found && found.ch == match.charAt(0), forward: dir > 0};\n
}\n
\n \n
var stack = [line.text.charAt(pos)], re = /[(){}[\\]]/;\n // bracketRegex is used to specify which type of bracket to scan\n
function scan(line, lineNo, start) {\n // should be a regexp, e.g. /[[\\]]/\n
if (!line.text) return;\n //\n
var pos = forward ? 0 : line.text.length - 1, end = forward ? line.text.length : -1;\n // Note: If "where" is on an open bracket, then this bracket is ignored.\n
if (line.text.length > maxScanLen) return null;\n //\n
if (start != null) pos = start + d;\n // Returns false when no bracket was found, null when it reached\n
for (; pos != end; pos += d) {\n // maxScanLines and gave up\n
var ch = line.text.charAt(pos);\n function scanForBracket(cm, where, dir, style, config) {\n
if (re.test(ch) && cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style) {\n var maxScanLen = (config && config.maxScanLineLength) || 10000;\n
var maxScanLines = (config && config.maxScanLines) || 1000;\n
\n
var stack = [];\n
var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\\]]/;\n
var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1)\n
: Math.max(cm.firstLine() - 1, where.line - maxScanLines);\n
for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) {\n
var line = cm.getLine(lineNo);\n
if (!line) continue;\n
var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1;\n
if (line.length > maxScanLen) continue;\n
if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0);\n
for (; pos != end; pos += dir) {\n
var ch = line.charAt(pos);\n
if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) {\n
var match = matching[ch];\n var match = matching[ch];\n
if (match.charAt(1) == ">" == forward) stack.push(ch);\n if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch);\n
else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};\n else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch};\n
else if (!stack.length) return {pos: pos, match: true};\n else stack.pop();\n
}\n }\n
}\n }\n
}\n }\n
for (var i = cur.line, found, e = forward ? Math.min(i + maxScanLines, cm.lineCount()) : Math.max(-1, i - maxScanLines); i != e; i+=d) {\n return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null;\n
if (i == cur.line) found = scan(line, i, pos);\n
else found = scan(cm.getLineHandle(i), i);\n
if (found) break;\n
}\n
return {from: Pos(cur.line, pos), to: found && Pos(i, found.pos),\n
match: found && found.match, forward: forward};\n
}\n }\n
\n \n
function matchBrackets(cm, autoclear) {\n function matchBrackets(cm, autoclear, config) {\n
// Disable brace matching in long lines, since it\'ll cause hugely slow updates\n // Disable brace matching in long lines, since it\'ll cause hugely slow updates\n
var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000;\n
var found = findMatchingBracket(cm);\n var marks = [], ranges = cm.listSelections();\n
if (!found || cm.getLine(found.from.line).length > maxHighlightLen ||\n for (var i = 0; i < ranges.length; i++) {\n
found.to && cm.getLine(found.to.line).length > maxHighlightLen)\n var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config);\n
return;\n if (match && cm.getLine(match.from.line).length <= maxHighlightLen) {\n
var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";\n
marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style}));\n
if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen)\n
marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style}));\n
}\n
}\n
\n
if (marks.length) {\n
// Kludge to work around the IE bug from issue #1193, where text\n
// input stops going to the textare whever this fires.\n
if (ie_lt8 && cm.state.focused) cm.display.input.focus();\n
\n \n
var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";\n var clear = function() {\n
var one = cm.markText(found.from, Pos(found.from.line, found.from.ch + 1), {className: style});\n cm.operation(function() {\n
var two = found.to && cm.markText(found.to, Pos(found.to.line, found.to.ch + 1), {className: style});\n for (var i = 0; i < marks.length; i++) marks[i].clear();\n
// Kludge to work around the IE bug from issue #1193, where text\n });\n
// input stops going to the textarea whenever this fires.\n };\n
if (ie_lt8 && cm.state.focused) cm.display.input.focus();\n if (autoclear) setTimeout(clear, 800);\n
var clear = function() {\n else return clear;\n
cm.operation(function() { one.clear(); two && two.clear(); });\n }\n
};\n
if (autoclear) setTimeout(clear, 800);\n
else return clear;\n
}\n }\n
\n \n
var currentlyHighlighted = null;\n var currentlyHighlighted = null;\n
function doMatchBrackets(cm) {\n function doMatchBrackets(cm) {\n
cm.operation(function() {\n cm.operation(function() {\n
if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;}\n
if (!cm.somethingSelected()) currentlyHighlighted = matchBrackets(cm, false);\n currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets);\n
});\n });\n
}\n }\n
\n \n
...@@ -105,10 +135,13 @@ ...@@ -105,10 +135,13 @@
});\n });\n
\n \n
CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});\n CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);});\n
CodeMirror.defineExtension("findMatchingBracket", function(pos, strict){\n CodeMirror.defineExtension("findMatchingBracket", function(pos, strict, config){\n
return findMatchingBracket(this, pos, strict);\n return findMatchingBracket(this, pos, strict, config);\n
});\n
CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){\n
return scanForBracket(this, pos, dir, style, config);\n
});\n });\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -119,7 +152,7 @@ ...@@ -119,7 +152,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3918</int> </value> <value> <int>5268</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404951.83</string> </value> <value> <string>ts21897296.03</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), require("../fold/xml-fold"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror", "../fold/xml-fold"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
CodeMirror.defineOption("matchTags", false, function(cm, val, old) {\n CodeMirror.defineOption("matchTags", false, function(cm, val, old) {\n
...@@ -74,10 +84,10 @@ ...@@ -74,10 +84,10 @@
var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n var found = CodeMirror.findMatchingTag(cm, cm.getCursor());\n
if (found) {\n if (found) {\n
var other = found.at == "close" ? found.open : found.close;\n var other = found.at == "close" ? found.open : found.close;\n
if (other) cm.setSelection(other.to, other.from);\n if (other) cm.extendSelection(other.to, other.from);\n
}\n }\n
};\n };\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -88,7 +98,7 @@ ...@@ -88,7 +98,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1878</int> </value> <value> <int>2355</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93404941.22</string> </value> <value> <string>ts21897285.4</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,20 +22,32 @@ ...@@ -22,20 +22,32 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
if (prev == CodeMirror.Init) prev = false;\n // Distributed under an MIT license: http://codemirror.net/LICENSE\n
if (prev && !val)\n \n
cm.removeOverlay("trailingspace");\n (function(mod) {\n
else if (!prev && val)\n if (typeof exports == "object" && typeof module == "object") // CommonJS\n
cm.addOverlay({\n mod(require("../../lib/codemirror"));\n
token: function(stream) {\n else if (typeof define == "function" && define.amd) // AMD\n
for (var l = stream.string.length, i = l; i && /\\s/.test(stream.string.charAt(i - 1)); --i) {}\n define(["../../lib/codemirror"], mod);\n
if (i > stream.pos) { stream.pos = i; return null; }\n else // Plain browser env\n
stream.pos = l;\n mod(CodeMirror);\n
return "trailingspace";\n })(function(CodeMirror) {\n
},\n CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {\n
name: "trailingspace"\n if (prev == CodeMirror.Init) prev = false;\n
});\n if (prev && !val)\n
cm.removeOverlay("trailingspace");\n
else if (!prev && val)\n
cm.addOverlay({\n
token: function(stream) {\n
for (var l = stream.string.length, i = l; i && /\\s/.test(stream.string.charAt(i - 1)); --i) {}\n
if (i > stream.pos) { stream.pos = i; return null; }\n
stream.pos = l;\n
return "trailingspace";\n
},\n
name: "trailingspace"\n
});\n
});\n
});\n });\n
...@@ -47,7 +59,7 @@ CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {\n ...@@ -47,7 +59,7 @@ CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>528</int> </value> <value> <int>1003</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.67</string> </value> <value> <string>ts21897116.87</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("fold", "brace", function(cm, start) {\n CodeMirror.registerHelper("fold", "brace", function(cm, start) {\n
var line = start.line, lineText = cm.getLine(line);\n var line = start.line, lineText = cm.getLine(line);\n
var startCh, tokenType;\n var startCh, tokenType;\n
...@@ -69,7 +82,6 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) {\n ...@@ -69,7 +82,6 @@ CodeMirror.registerHelper("fold", "brace", function(cm, start) {\n
return {from: CodeMirror.Pos(line, startCh),\n return {from: CodeMirror.Pos(line, startCh),\n
to: CodeMirror.Pos(end, endCh)};\n to: CodeMirror.Pos(end, endCh)};\n
});\n });\n
CodeMirror.braceRangeFinder = CodeMirror.fold.brace; // deprecated\n
\n \n
CodeMirror.registerHelper("fold", "import", function(cm, start) {\n CodeMirror.registerHelper("fold", "import", function(cm, start) {\n
function hasImport(line) {\n function hasImport(line) {\n
...@@ -94,7 +106,6 @@ CodeMirror.registerHelper("fold", "import", function(cm, start) {\n ...@@ -94,7 +106,6 @@ CodeMirror.registerHelper("fold", "import", function(cm, start) {\n
}\n }\n
return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};\n return {from: cm.clipPos(CodeMirror.Pos(start, has.startCh + 1)), to: end};\n
});\n });\n
CodeMirror.importRangeFinder = CodeMirror.fold["import"]; // deprecated\n
\n \n
CodeMirror.registerHelper("fold", "include", function(cm, start) {\n CodeMirror.registerHelper("fold", "include", function(cm, start) {\n
function hasInclude(line) {\n function hasInclude(line) {\n
...@@ -114,7 +125,8 @@ CodeMirror.registerHelper("fold", "include", function(cm, start) {\n ...@@ -114,7 +125,8 @@ CodeMirror.registerHelper("fold", "include", function(cm, start) {\n
return {from: CodeMirror.Pos(start, has + 1),\n return {from: CodeMirror.Pos(start, has + 1),\n
to: cm.clipPos(CodeMirror.Pos(end))};\n to: cm.clipPos(CodeMirror.Pos(end))};\n
});\n });\n
CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated\n \n
});\n
]]></string> </value> ]]></string> </value>
...@@ -125,7 +137,7 @@ CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated\n ...@@ -125,7 +137,7 @@ CodeMirror.includeRangeFinder = CodeMirror.fold.include; // deprecated\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3653</int> </value> <value> <int>3904</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.24</string> </value> <value> <string>ts21897116.29</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n
return mode.blockCommentStart && mode.blockCommentEnd;\n return mode.blockCommentStart && mode.blockCommentEnd;\n
}, function(cm, start) {\n }, function(cm, start) {\n
...@@ -64,6 +77,8 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n ...@@ -64,6 +77,8 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n
return {from: CodeMirror.Pos(line, startCh),\n return {from: CodeMirror.Pos(line, startCh),\n
to: CodeMirror.Pos(end, endCh)};\n to: CodeMirror.Pos(end, endCh)};\n
});\n });\n
\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -74,7 +89,7 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n ...@@ -74,7 +89,7 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1538</int> </value> <value> <int>1999</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.02</string> </value> <value> <string>ts21897116.45</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,14 +22,28 @@ ...@@ -22,14 +22,28 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
function doFold(cm, pos, options, force) {\n function doFold(cm, pos, options, force) {\n
var finder = options && (options.call ? options : options.rangeFinder);\n if (options && options.call) {\n
if (!finder) finder = CodeMirror.fold.auto;\n var finder = options;\n
options = null;\n
} else {\n
var finder = getOption(cm, options, "rangeFinder");\n
}\n
if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);\n if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0);\n
var minSize = options && options.minFoldSize || 0;\n var minSize = getOption(cm, options, "minFoldSize");\n
\n \n
function getRange(allowFolded) {\n function getRange(allowFolded) {\n
var range = finder(cm, pos);\n var range = finder(cm, pos);\n
...@@ -46,14 +60,17 @@ ...@@ -46,14 +60,17 @@
}\n }\n
\n \n
var range = getRange(true);\n var range = getRange(true);\n
if (options && options.scanUp) while (!range && pos.line > cm.firstLine()) {\n if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) {\n
pos = CodeMirror.Pos(pos.line - 1, 0);\n pos = CodeMirror.Pos(pos.line - 1, 0);\n
range = getRange(false);\n range = getRange(false);\n
}\n }\n
if (!range || range.cleared || force === "unfold") return;\n if (!range || range.cleared || force === "unfold") return;\n
\n \n
var myWidget = makeWidget(options);\n var myWidget = makeWidget(cm, options);\n
CodeMirror.on(myWidget, "mousedown", function() { myRange.clear(); });\n CodeMirror.on(myWidget, "mousedown", function(e) {\n
myRange.clear();\n
CodeMirror.e_preventDefault(e);\n
});\n
var myRange = cm.markText(range.from, range.to, {\n var myRange = cm.markText(range.from, range.to, {\n
replacedWith: myWidget,\n replacedWith: myWidget,\n
clearOnEnter: true,\n clearOnEnter: true,\n
...@@ -65,8 +82,8 @@ ...@@ -65,8 +82,8 @@
CodeMirror.signal(cm, "fold", cm, range.from, range.to);\n CodeMirror.signal(cm, "fold", cm, range.from, range.to);\n
}\n }\n
\n \n
function makeWidget(options) {\n function makeWidget(cm, options) {\n
var widget = (options && options.widget) || "\\u2194";\n var widget = getOption(cm, options, "widget");\n
if (typeof widget == "string") {\n if (typeof widget == "string") {\n
var text = document.createTextNode(widget);\n var text = document.createTextNode(widget);\n
widget = document.createElement("span");\n widget = document.createElement("span");\n
...@@ -92,9 +109,27 @@ ...@@ -92,9 +109,27 @@
if (marks[i].__isFold) return true;\n if (marks[i].__isFold) return true;\n
});\n });\n
\n \n
CodeMirror.commands.fold = function(cm) {\n CodeMirror.commands.toggleFold = function(cm) {\n
cm.foldCode(cm.getCursor());\n cm.foldCode(cm.getCursor());\n
};\n };\n
CodeMirror.commands.fold = function(cm) {\n
cm.foldCode(cm.getCursor(), null, "fold");\n
};\n
CodeMirror.commands.unfold = function(cm) {\n
cm.foldCode(cm.getCursor(), null, "unfold");\n
};\n
CodeMirror.commands.foldAll = function(cm) {\n
cm.operation(function() {\n
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n
cm.foldCode(CodeMirror.Pos(i, 0), null, "fold");\n
});\n
};\n
CodeMirror.commands.unfoldAll = function(cm) {\n
cm.operation(function() {\n
for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++)\n
cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold");\n
});\n
};\n
\n \n
CodeMirror.registerHelper("fold", "combine", function() {\n CodeMirror.registerHelper("fold", "combine", function() {\n
var funcs = Array.prototype.slice.call(arguments, 0);\n var funcs = Array.prototype.slice.call(arguments, 0);\n
...@@ -113,7 +148,25 @@ ...@@ -113,7 +148,25 @@
if (cur) return cur;\n if (cur) return cur;\n
}\n }\n
});\n });\n
})();\n \n
var defaultOptions = {\n
rangeFinder: CodeMirror.fold.auto,\n
widget: "\\u2194",\n
minFoldSize: 0,\n
scanUp: false\n
};\n
\n
CodeMirror.defineOption("foldOptions", null);\n
\n
function getOption(cm, options, name) {\n
if (options && options[name] !== undefined)\n
return options[name];\n
var editorOptions = cm.options.foldOptions;\n
if (editorOptions && editorOptions[name] !== undefined)\n
return editorOptions[name];\n
return defaultOptions[name];\n
}\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -124,7 +177,7 @@ ...@@ -124,7 +177,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2941</int> </value> <value> <int>4574</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
}\n }\n
.CodeMirror-foldgutter-open,\n .CodeMirror-foldgutter-open,\n
.CodeMirror-foldgutter-folded {\n .CodeMirror-foldgutter-folded {\n
color: #555;\n
cursor: pointer;\n cursor: pointer;\n
}\n }\n
.CodeMirror-foldgutter-open:after {\n .CodeMirror-foldgutter-open:after {\n
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.13</string> </value> <value> <string>ts21897116.36</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), require("./foldcode"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror", "./foldcode"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {\n CodeMirror.defineOption("foldGutter", false, function(cm, val, old) {\n
...@@ -72,7 +82,7 @@ ...@@ -72,7 +82,7 @@
function marker(spec) {\n function marker(spec) {\n
if (typeof spec == "string") {\n if (typeof spec == "string") {\n
var elt = document.createElement("div");\n var elt = document.createElement("div");\n
elt.className = spec;\n elt.className = spec + " CodeMirror-guttermarker-subtle";\n
return elt;\n return elt;\n
} else {\n } else {\n
return spec.cloneNode(true);\n return spec.cloneNode(true);\n
...@@ -145,7 +155,7 @@ ...@@ -145,7 +155,7 @@
if (line >= state.from && line < state.to)\n if (line >= state.from && line < state.to)\n
updateFoldInfo(cm, line, line + 1);\n updateFoldInfo(cm, line, line + 1);\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -156,7 +166,7 @@ ...@@ -156,7 +166,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3874</int> </value> <value> <int>4372</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.31</string> </value> <value> <string>ts21897116.2</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("fold", "indent", function(cm, start) {\n CodeMirror.registerHelper("fold", "indent", function(cm, start) {\n
var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);\n var tabSize = cm.getOption("tabSize"), firstLine = cm.getLine(start.line);\n
if (!/\\S/.test(firstLine)) return;\n if (!/\\S/.test(firstLine)) return;\n
...@@ -51,7 +64,8 @@ CodeMirror.registerHelper("fold", "indent", function(cm, start) {\n ...@@ -51,7 +64,8 @@ CodeMirror.registerHelper("fold", "indent", function(cm, start) {\n
to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n to: CodeMirror.Pos(lastLineInFold, cm.getLine(lastLineInFold).length)\n
};\n };\n
});\n });\n
CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated\n \n
});\n
]]></string> </value> ]]></string> </value>
...@@ -62,7 +76,7 @@ CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated\n ...@@ -62,7 +76,7 @@ CodeMirror.indentRangeFinder = CodeMirror.fold.indent; // deprecated\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1235</int> </value> <value> <int>1627</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.79</string> </value> <value> <string>ts21897116.73</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n
var maxDepth = 100;\n var maxDepth = 100;\n
\n \n
...@@ -56,6 +69,8 @@ CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n ...@@ -56,6 +69,8 @@ CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n
to: CodeMirror.Pos(end, cm.getLine(end).length)\n to: CodeMirror.Pos(end, cm.getLine(end).length)\n
};\n };\n
});\n });\n
\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -66,7 +81,7 @@ CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n ...@@ -66,7 +81,7 @@ CodeMirror.registerHelper("fold", "markdown", function(cm, start) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1144</int> </value> <value> <int>1605</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403076.92</string> </value> <value> <string>ts21897116.59</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
var Pos = CodeMirror.Pos;\n var Pos = CodeMirror.Pos;\n
...@@ -160,15 +170,14 @@ ...@@ -160,15 +170,14 @@
}\n }\n
}\n }\n
});\n });\n
CodeMirror.tagRangeFinder = CodeMirror.fold.xml; // deprecated\n
\n
CodeMirror.findMatchingTag = function(cm, pos, range) {\n CodeMirror.findMatchingTag = function(cm, pos, range) {\n
var iter = new Iter(cm, pos.line, pos.ch, range);\n var iter = new Iter(cm, pos.line, pos.ch, range);\n
if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;\n if (iter.text.indexOf(">") == -1 && iter.text.indexOf("<") == -1) return;\n
var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n var end = toTagEnd(iter), to = end && Pos(iter.line, iter.ch);\n
var start = end && toTagStart(iter);\n var start = end && toTagStart(iter);\n
if (!end || end == "selfClose" || !start || cmp(iter, pos) > 0) return;\n if (!end || !start || cmp(iter, pos) > 0) return;\n
var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n var here = {from: Pos(iter.line, iter.ch), to: to, tag: start[2]};\n
if (end == "selfClose") return {open: here, close: null, at: "open"};\n
\n \n
if (start[1]) { // closing tag\n if (start[1]) { // closing tag\n
return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};\n return {open: findMatchingOpen(iter, start[2]), close: here, at: "close"};\n
...@@ -192,9 +201,9 @@ ...@@ -192,9 +201,9 @@
// Used by addon/edit/closetag.js\n // Used by addon/edit/closetag.js\n
CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n CodeMirror.scanForClosingTag = function(cm, pos, name, end) {\n
var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n var iter = new Iter(cm, pos.line, pos.ch, end ? {from: 0, to: end} : null);\n
return !!findMatchingClose(iter, name);\n return findMatchingClose(iter, name);\n
};\n };\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -205,7 +214,7 @@ ...@@ -205,7 +214,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>6161</int> </value> <value> <int>6570</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.24</string> </value> <value> <string>ts21897118.73</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
var WORD = /[\\w$]+/, RANGE = 500;\n var WORD = /[\\w$]+/, RANGE = 500;\n
...@@ -31,8 +41,7 @@ ...@@ -31,8 +41,7 @@
var word = options && options.word || WORD;\n var word = options && options.word || WORD;\n
var range = options && options.range || RANGE;\n var range = options && options.range || RANGE;\n
var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n var cur = editor.getCursor(), curLine = editor.getLine(cur.line);\n
var start = cur.ch, end = start;\n var end = cur.ch, start = end;\n
while (end < curLine.length && word.test(curLine.charAt(end))) ++end;\n
while (start && word.test(curLine.charAt(start - 1))) --start;\n while (start && word.test(curLine.charAt(start - 1))) --start;\n
var curWord = start != end && curLine.slice(start, end);\n var curWord = start != end && curLine.slice(start, end);\n
\n \n
...@@ -53,7 +62,7 @@ ...@@ -53,7 +62,7 @@
}\n }\n
return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};\n
});\n });\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -64,7 +73,7 @@ ...@@ -64,7 +73,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1304</int> </value> <value> <int>1653</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.76</string> </value> <value> <string>ts21897119.18</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -20,7 +20,19 @@ ...@@ -20,7 +20,19 @@
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>(function () {\n <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), require("../../mode/css/css"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror", "../../mode/css/css"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,\n var pseudoClasses = {link: 1, visited: 1, active: 1, hover: 1, focus: 1,\n
...@@ -32,7 +44,7 @@ ...@@ -32,7 +44,7 @@
var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n
if (inner.mode.name != "css") return;\n if (inner.mode.name != "css") return;\n
\n \n
var word = token.string, start = token.start, end = token.end;\n var start = token.start, end = cur.ch, word = token.string.slice(0, end - start);\n
if (/[^\\w$_-]/.test(word)) {\n if (/[^\\w$_-]/.test(word)) {\n
word = ""; start = end = cur.ch;\n word = ""; start = end = cur.ch;\n
}\n }\n
...@@ -46,7 +58,7 @@ ...@@ -46,7 +58,7 @@
result.push(name);\n result.push(name);\n
}\n }\n
\n \n
var st = token.state.state;\n var st = inner.state.state;\n
if (st == "pseudo" || token.type == "variable-3") {\n if (st == "pseudo" || token.type == "variable-3") {\n
add(pseudoClasses);\n add(pseudoClasses);\n
} else if (st == "block" || st == "maybeprop") {\n } else if (st == "block" || st == "maybeprop") {\n
...@@ -65,8 +77,10 @@ ...@@ -65,8 +77,10 @@
to: CodeMirror.Pos(cur.line, end)\n to: CodeMirror.Pos(cur.line, end)\n
};\n };\n
});\n });\n
})();\n });\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -74,7 +88,7 @@ ...@@ -74,7 +88,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1455</int> </value> <value> <int>1951</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,20 +8,12 @@ ...@@ -8,20 +8,12 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.35</string> </value> <value> <string>ts21897119.52</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
<value> <string>html-hint.js</string> </value> <value> <string>html-hint.js</string> </value>
</item> </item>
<item>
<key> <string>__propsets__</string> </key>
<value>
<tuple>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</tuple>
</value>
</item>
<item> <item>
<key> <string>content_type</string> </key> <key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value> <value> <string>application/javascript</string> </value>
...@@ -30,7 +22,19 @@ ...@@ -30,7 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function () {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), require("./xml-hint"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror", "./xml-hint"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" ");\n var langs = "ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" ");\n
var targets = ["_blank", "_self", "_top", "_parent"];\n var targets = ["_blank", "_self", "_top", "_parent"];\n
var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];\n var charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];\n
...@@ -364,9 +368,8 @@ ...@@ -364,9 +368,8 @@
if (options) for (var opt in options) local[opt] = options[opt];\n if (options) for (var opt in options) local[opt] = options[opt];\n
return CodeMirror.hint.xml(cm, local);\n return CodeMirror.hint.xml(cm, local);\n
}\n }\n
CodeMirror.htmlHint = htmlHint; // deprecated\n
CodeMirror.registerHelper("hint", "html", htmlHint);\n CodeMirror.registerHelper("hint", "html", htmlHint);\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -377,7 +380,7 @@ ...@@ -377,7 +380,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>10911</int> </value> <value> <int>11341</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
...@@ -386,62 +389,4 @@ ...@@ -386,62 +389,4 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PropertySheet" module="OFS.PropertySheets"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_md</string> </key>
<value>
<dictionary>
<item>
<key> <string>xmlns</string> </key>
<value> <unicode>http://apache.org/dav/props/</unicode> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <unicode>executable</unicode> </value>
</item>
<item>
<key> <string>meta</string> </key>
<value>
<dictionary>
<item>
<key> <string>__xml_attrs__</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>string</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>executable</string> </key>
<value> <string>T</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData> </ZopeData>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.83</string> </value> <value> <string>ts21897119.08</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function () {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
var Pos = CodeMirror.Pos;\n var Pos = CodeMirror.Pos;\n
\n \n
function forEach(arr, f) {\n function forEach(arr, f) {\n
...@@ -44,15 +54,20 @@ ...@@ -44,15 +54,20 @@
\n \n
function scriptHint(editor, keywords, getToken, options) {\n function scriptHint(editor, keywords, getToken, options) {\n
// Find the token at the cursor\n // Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n var cur = editor.getCursor(), token = getToken(editor, cur);\n
if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n if (/\\b(?:string|comment)\\b/.test(token.type)) return;\n
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;\n token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;\n
\n \n
// If it\'s not a \'word-style\' token, ignore the token.\n // If it\'s not a \'word-style\' token, ignore the token.\n
if (!/^[\\w$_]*$/.test(token.string)) {\n if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n token = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
type: token.string == "." ? "property" : null};\n type: token.string == "." ? "property" : null};\n
} else if (token.end > cur.ch) {\n
token.end = cur.ch;\n
token.string = token.string.slice(0, cur.ch - token.start);\n
}\n }\n
\n
var tprop = token;\n
// If it is a property, find out what it is a property of.\n // If it is a property, find out what it is a property of.\n
while (tprop.type == "property") {\n while (tprop.type == "property") {\n
tprop = getToken(editor, Pos(cur.line, tprop.start));\n tprop = getToken(editor, Pos(cur.line, tprop.start));\n
...@@ -71,7 +86,6 @@ ...@@ -71,7 +86,6 @@
function (e, cur) {return e.getTokenAt(cur);},\n function (e, cur) {return e.getTokenAt(cur);},\n
options);\n options);\n
};\n };\n
CodeMirror.javascriptHint = javascriptHint; // deprecated\n
CodeMirror.registerHelper("hint", "javascript", javascriptHint);\n CodeMirror.registerHelper("hint", "javascript", javascriptHint);\n
\n \n
function getCoffeeScriptToken(editor, cur) {\n function getCoffeeScriptToken(editor, cur) {\n
...@@ -95,7 +109,6 @@ ...@@ -95,7 +109,6 @@
function coffeescriptHint(editor, options) {\n function coffeescriptHint(editor, options) {\n
return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n return scriptHint(editor, coffeescriptKeywords, getCoffeeScriptToken, options);\n
}\n }\n
CodeMirror.coffeescriptHint = coffeescriptHint; // deprecated\n
CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);\n CodeMirror.registerHelper("hint", "coffeescript", coffeescriptHint);\n
\n \n
var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +\n var stringProps = ("charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight " +\n
...@@ -109,7 +122,7 @@ ...@@ -109,7 +122,7 @@
"if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");\n "if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes").split(" ");\n
\n \n
function getCompletions(token, context, keywords, options) {\n function getCompletions(token, context, keywords, options) {\n
var found = [], start = token.string;\n var found = [], start = token.string, global = options && options.globalScope || window;\n
function maybeAdd(str) {\n function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n }\n
...@@ -127,32 +140,34 @@ ...@@ -127,32 +140,34 @@
if (obj.type && obj.type.indexOf("variable") === 0) {\n if (obj.type && obj.type.indexOf("variable") === 0) {\n
if (options && options.additionalContext)\n if (options && options.additionalContext)\n
base = options.additionalContext[obj.string];\n base = options.additionalContext[obj.string];\n
base = base || window[obj.string];\n if (!options || options.useGlobalScope !== false)\n
base = base || global[obj.string];\n
} else if (obj.type == "string") {\n } else if (obj.type == "string") {\n
base = "";\n base = "";\n
} else if (obj.type == "atom") {\n } else if (obj.type == "atom") {\n
base = 1;\n base = 1;\n
} else if (obj.type == "function") {\n } else if (obj.type == "function") {\n
if (window.jQuery != null && (obj.string == \'$\' || obj.string == \'jQuery\') &&\n if (global.jQuery != null && (obj.string == \'$\' || obj.string == \'jQuery\') &&\n
(typeof window.jQuery == \'function\'))\n (typeof global.jQuery == \'function\'))\n
base = window.jQuery();\n base = global.jQuery();\n
else if (window._ != null && (obj.string == \'_\') && (typeof window._ == \'function\'))\n else if (global._ != null && (obj.string == \'_\') && (typeof global._ == \'function\'))\n
base = window._();\n base = global._();\n
}\n }\n
while (base != null && context.length)\n while (base != null && context.length)\n
base = base[context.pop().string];\n base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n if (base != null) gatherCompletions(base);\n
} else {\n } else {\n
// If not, just look in the window object and any local scope\n // If not, just look in the global object and any local scope\n
// (reading into JS mode internals to get at the local and global variables)\n // (reading into JS mode internals to get at the local and global variables)\n
for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);\n
for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n for (var v = token.state.globalVars; v; v = v.next) maybeAdd(v.name);\n
gatherCompletions(window);\n if (!options || options.useGlobalScope !== false)\n
gatherCompletions(global);\n
forEach(keywords, maybeAdd);\n forEach(keywords, maybeAdd);\n
}\n }\n
return found;\n return found;\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -163,7 +178,7 @@ ...@@ -163,7 +178,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>5572</int> </value> <value> <int>6163</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.21</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>pig-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function () {\n
"use strict";\n
\n
function forEach(arr, f) {\n
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n
}\n
\n
function arrayContains(arr, item) {\n
if (!Array.prototype.indexOf) {\n
var i = arr.length;\n
while (i--) {\n
if (arr[i] === item) {\n
return true;\n
}\n
}\n
return false;\n
}\n
return arr.indexOf(item) != -1;\n
}\n
\n
function scriptHint(editor, _keywords, getToken) {\n
// Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n
// If it\'s not a \'word-style\' token, ignore the token.\n
\n
if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
className: token.string == ":" ? "pig-type" : null};\n
}\n
\n
if (!context) var context = [];\n
context.push(tprop);\n
\n
var completionList = getCompletions(token, context);\n
completionList = completionList.sort();\n
//prevent autocomplete for last word, instead show dropdown with one word\n
if(completionList.length == 1) {\n
completionList.push(" ");\n
}\n
\n
return {list: completionList,\n
from: CodeMirror.Pos(cur.line, token.start),\n
to: CodeMirror.Pos(cur.line, token.end)};\n
}\n
\n
function pigHint(editor) {\n
return scriptHint(editor, pigKeywordsU, function (e, cur) {return e.getTokenAt(cur);});\n
}\n
CodeMirror.pigHint = pigHint; // deprecated\n
CodeMirror.registerHelper("hint", "pig", pigHint);\n
\n
var pigKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP "\n
+ "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL "\n
+ "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE "\n
+ "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE "\n
+ "NEQ MATCHES TRUE FALSE";\n
var pigKeywordsU = pigKeywords.split(" ");\n
var pigKeywordsL = pigKeywords.toLowerCase().split(" ");\n
\n
var pigTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP";\n
var pigTypesU = pigTypes.split(" ");\n
var pigTypesL = pigTypes.toLowerCase().split(" ");\n
\n
var pigBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL "\n
+ "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS "\n
+ "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG "\n
+ "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN "\n
+ "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER "\n
+ "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS "\n
+ "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA "\n
+ "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE "\n
+ "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG "\n
+ "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER";\n
var pigBuiltinsU = pigBuiltins.split(" ").join("() ").split(" ");\n
var pigBuiltinsL = pigBuiltins.toLowerCase().split(" ").join("() ").split(" ");\n
var pigBuiltinsC = ("BagSize BinStorage Bloom BuildBloom ConstantSize CubeDimensions DoubleAbs "\n
+ "DoubleAvg DoubleBase DoubleMax DoubleMin DoubleRound DoubleSum FloatAbs FloatAvg FloatMax "\n
+ "FloatMin FloatRound FloatSum GenericInvoker IntAbs IntAvg IntMax IntMin IntSum "\n
+ "InvokeForDouble InvokeForFloat InvokeForInt InvokeForLong InvokeForString Invoker "\n
+ "IsEmpty JsonLoader JsonMetadata JsonStorage LongAbs LongAvg LongMax LongMin LongSum MapSize "\n
+ "MonitoredUDF Nondeterministic OutputSchema PigStorage PigStreaming StringConcat StringMax "\n
+ "StringMin StringSize TextLoader TupleSize Utf8StorageConverter").split(" ").join("() ").split(" ");\n
\n
function getCompletions(token, context) {\n
var found = [], start = token.string;\n
function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n
\n
function gatherCompletions(obj) {\n
if(obj == ":") {\n
forEach(pigTypesL, maybeAdd);\n
}\n
else {\n
forEach(pigBuiltinsU, maybeAdd);\n
forEach(pigBuiltinsL, maybeAdd);\n
forEach(pigBuiltinsC, maybeAdd);\n
forEach(pigTypesU, maybeAdd);\n
forEach(pigTypesL, maybeAdd);\n
forEach(pigKeywordsU, maybeAdd);\n
forEach(pigKeywordsL, maybeAdd);\n
}\n
}\n
\n
if (context) {\n
// If this is a property, see if it belongs to some object we can\n
// find in the current environment.\n
var obj = context.pop(), base;\n
\n
if (obj.type == "variable")\n
base = obj.string;\n
else if(obj.type == "variable-3")\n
base = ":" + obj.string;\n
\n
while (base != null && context.length)\n
base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n
}\n
return found;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>5117</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403075.08</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>python-hint.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function () {\n
function forEach(arr, f) {\n
for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]);\n
}\n
\n
function arrayContains(arr, item) {\n
if (!Array.prototype.indexOf) {\n
var i = arr.length;\n
while (i--) {\n
if (arr[i] === item) {\n
return true;\n
}\n
}\n
return false;\n
}\n
return arr.indexOf(item) != -1;\n
}\n
\n
function scriptHint(editor, _keywords, getToken) {\n
// Find the token at the cursor\n
var cur = editor.getCursor(), token = getToken(editor, cur), tprop = token;\n
// If it\'s not a \'word-style\' token, ignore the token.\n
\n
if (!/^[\\w$_]*$/.test(token.string)) {\n
token = tprop = {start: cur.ch, end: cur.ch, string: "", state: token.state,\n
className: token.string == ":" ? "python-type" : null};\n
}\n
\n
if (!context) var context = [];\n
context.push(tprop);\n
\n
var completionList = getCompletions(token, context);\n
completionList = completionList.sort();\n
\n
return {list: completionList,\n
from: CodeMirror.Pos(cur.line, token.start),\n
to: CodeMirror.Pos(cur.line, token.end)};\n
}\n
\n
function pythonHint(editor) {\n
return scriptHint(editor, pythonKeywordsU, function (e, cur) {return e.getTokenAt(cur);});\n
}\n
CodeMirror.pythonHint = pythonHint; // deprecated\n
CodeMirror.registerHelper("hint", "python", pythonHint);\n
\n
var pythonKeywords = "and del from not while as elif global or with assert else if pass yield"\n
+ "break except import print class exec in raise continue finally is return def for lambda try";\n
var pythonKeywordsL = pythonKeywords.split(" ");\n
var pythonKeywordsU = pythonKeywords.toUpperCase().split(" ");\n
\n
var pythonBuiltins = "abs divmod input open staticmethod all enumerate int ord str "\n
+ "any eval isinstance pow sum basestring execfile issubclass print super"\n
+ "bin file iter property tuple bool filter len range type"\n
+ "bytearray float list raw_input unichr callable format locals reduce unicode"\n
+ "chr frozenset long reload vars classmethod getattr map repr xrange"\n
+ "cmp globals max reversed zip compile hasattr memoryview round __import__"\n
+ "complex hash min set apply delattr help next setattr buffer"\n
+ "dict hex object slice coerce dir id oct sorted intern ";\n
var pythonBuiltinsL = pythonBuiltins.split(" ").join("() ").split(" ");\n
var pythonBuiltinsU = pythonBuiltins.toUpperCase().split(" ").join("() ").split(" ");\n
\n
function getCompletions(token, context) {\n
var found = [], start = token.string;\n
function maybeAdd(str) {\n
if (str.lastIndexOf(start, 0) == 0 && !arrayContains(found, str)) found.push(str);\n
}\n
\n
function gatherCompletions(_obj) {\n
forEach(pythonBuiltinsL, maybeAdd);\n
forEach(pythonBuiltinsU, maybeAdd);\n
forEach(pythonKeywordsL, maybeAdd);\n
forEach(pythonKeywordsU, maybeAdd);\n
}\n
\n
if (context) {\n
// If this is a property, see if it belongs to some object we can\n
// find in the current environment.\n
var obj = context.pop(), base;\n
\n
if (obj.type == "variable")\n
base = obj.string;\n
else if(obj.type == "variable-3")\n
base = ":" + obj.string;\n
\n
while (base != null && context.length)\n
base = base[context.pop().string];\n
if (base != null) gatherCompletions(base);\n
}\n
return found;\n
}\n
})();\n
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>3331</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
cursor: pointer;\n cursor: pointer;\n
}\n }\n
\n \n
.CodeMirror-hint-active {\n li.CodeMirror-hint-active {\n
background: #08f;\n background: #08f;\n
color: white;\n color: white;\n
}\n }\n
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403074.98</string> </value> <value> <string>ts21897118.97</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
\n \n
var Pos = CodeMirror.Pos;\n var Pos = CodeMirror.Pos;\n
...@@ -32,30 +42,55 @@ ...@@ -32,30 +42,55 @@
var quote = (options && options.quoteChar) || \'"\';\n var quote = (options && options.quoteChar) || \'"\';\n
if (!tags) return;\n if (!tags) return;\n
var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n var cur = cm.getCursor(), token = cm.getTokenAt(cur);\n
if (token.end > cur.ch) {\n
token.end = cur.ch;\n
token.string = token.string.slice(0, cur.ch - token.start);\n
}\n
var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n var inner = CodeMirror.innerMode(cm.getMode(), token.state);\n
if (inner.mode.name != "xml") return;\n if (inner.mode.name != "xml") return;\n
var result = [], replaceToken = false, prefix;\n var result = [], replaceToken = false, prefix;\n
var isTag = token.string.charAt(0) == "<";\n var tag = /\\btag\\b/.test(token.type) && !/>$/.test(token.string);\n
if (!inner.state.tagName || isTag) { // Tag completion\n var tagName = tag && /^\\w/.test(token.string), tagStart;\n
if (isTag) {\n \n
prefix = token.string.slice(1);\n if (tagName) {\n
replaceToken = true;\n var before = cm.getLine(cur.line).slice(Math.max(0, token.start - 2), token.start);\n
}\n var tagType = /<\\/$/.test(before) ? "close" : /<$/.test(before) ? "open" : null;\n
if (tagType) tagStart = token.start - (tagType == "close" ? 2 : 1);\n
} else if (tag && token.string == "<") {\n
tagType = "open";\n
} else if (tag && token.string == "</") {\n
tagType = "close";\n
}\n
\n
if (!tag && !inner.state.tagName || tagType) {\n
if (tagName)\n
prefix = token.string;\n
replaceToken = tagType;\n
var cx = inner.state.context, curTag = cx && tags[cx.tagName];\n var cx = inner.state.context, curTag = cx && tags[cx.tagName];\n
var childList = cx ? curTag && curTag.children : tags["!top"];\n var childList = cx ? curTag && curTag.children : tags["!top"];\n
if (childList) {\n if (childList && tagType != "close") {\n
for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)\n for (var i = 0; i < childList.length; ++i) if (!prefix || childList[i].lastIndexOf(prefix, 0) == 0)\n
result.push("<" + childList[i]);\n result.push("<" + childList[i]);\n
} else {\n } else if (tagType != "close") {\n
for (var name in tags) if (tags.hasOwnProperty(name) && name != "!top" && (!prefix || name.lastIndexOf(prefix, 0) == 0))\n for (var name in tags)\n
result.push("<" + name);\n if (tags.hasOwnProperty(name) && name != "!top" && name != "!attrs" && (!prefix || name.lastIndexOf(prefix, 0) == 0))\n
result.push("<" + name);\n
}\n }\n
if (cx && (!prefix || ("/" + cx.tagName).lastIndexOf(prefix, 0) == 0))\n if (cx && (!prefix || tagType == "close" && cx.tagName.lastIndexOf(prefix, 0) == 0))\n
result.push("</" + cx.tagName + ">");\n result.push("</" + cx.tagName + ">");\n
} else {\n } else {\n
// Attribute completion\n // Attribute completion\n
var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs;\n var curTag = tags[inner.state.tagName], attrs = curTag && curTag.attrs;\n
if (!attrs) return;\n var globalAttrs = tags["!attrs"];\n
if (!attrs && !globalAttrs) return;\n
if (!attrs) {\n
attrs = globalAttrs;\n
} else if (globalAttrs) { // Combine tag-local and global attributes\n
var set = {};\n
for (var nm in globalAttrs) if (globalAttrs.hasOwnProperty(nm)) set[nm] = globalAttrs[nm];\n
for (var nm in attrs) if (attrs.hasOwnProperty(nm)) set[nm] = attrs[nm];\n
attrs = set;\n
}\n
if (token.type == "string" || token.string == "=") { // A value\n if (token.type == "string" || token.string == "=") { // A value\n
var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)),\n var before = cm.getRange(Pos(cur.line, Math.max(0, cur.ch - 60)),\n
Pos(cur.line, token.type == "string" ? token.start : token.end));\n Pos(cur.line, token.type == "string" ? token.start : token.end));\n
...@@ -64,9 +99,16 @@ ...@@ -64,9 +99,16 @@
if (typeof atValues == \'function\') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget\n if (typeof atValues == \'function\') atValues = atValues.call(this, cm); // Functions can be used to supply values for autocomplete widget\n
if (token.type == "string") {\n if (token.type == "string") {\n
prefix = token.string;\n prefix = token.string;\n
var n = 0;\n
if (/[\'"]/.test(token.string.charAt(0))) {\n if (/[\'"]/.test(token.string.charAt(0))) {\n
quote = token.string.charAt(0);\n quote = token.string.charAt(0);\n
prefix = token.string.slice(1);\n prefix = token.string.slice(1);\n
n++;\n
}\n
var len = token.string.length;\n
if (/[\'"]/.test(token.string.charAt(len - 1))) {\n
quote = token.string.charAt(len - 1);\n
prefix = token.string.substr(n, len - 2);\n
}\n }\n
replaceToken = true;\n replaceToken = true;\n
}\n }\n
...@@ -83,14 +125,13 @@ ...@@ -83,14 +125,13 @@
}\n }\n
return {\n return {\n
list: result,\n list: result,\n
from: replaceToken ? Pos(cur.line, token.start) : cur,\n from: replaceToken ? Pos(cur.line, tagStart == null ? token.start : tagStart) : cur,\n
to: replaceToken ? Pos(cur.line, token.end) : cur\n to: replaceToken ? Pos(cur.line, token.end) : cur\n
};\n };\n
}\n }\n
\n \n
CodeMirror.xmlHint = getHints; // deprecated\n
CodeMirror.registerHelper("hint", "xml", getHints);\n CodeMirror.registerHelper("hint", "xml", getHints);\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -101,7 +142,7 @@ ...@@ -101,7 +142,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>2964</int> </value> <value> <int>4735</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts21898627.73</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>.css-lint.js.swp</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/octet-stream</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="base64">YjBuYW5vIDIuMy4AtX8AAMB7TQEAAAAAXhRNAWFybmF1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAEDWSwFtaW5qbwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAABQNk0BL21udC9k
YXZfZXJwNS9wb3J0YWxfc2tpbnMvZXJwNV9jb2RlX21pcnJvci9jb2RlbWlycm9yL2FkZG9uL2xp
bnQvY3NzLWxpbnQuanMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgQEAAAAAAACg300BAAAAAKDMTQEAAAAA
AAAAAAAAAABhAQAAAAAAAKDfTQEAAAAAoMxNAQAAAAAAAAAAAAAAAEEBAAAAAAAAIM5NAQAAAACg
300BAAAAAAAAAAAAAAAAIQEAAAAAAADgzE0BAAAAAFA2TQEAAAAAAAAAAAAAAAABAQAAAAAAAA==</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1024</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403072.66</string> </value> <value> <string>ts21897121.01</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,10 +22,23 @@ ...@@ -22,10 +22,23 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
// Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js\n // Depends on coffeelint.js from http://www.coffeelint.org/js/coffeelint.js\n
\n \n
// declare global: coffeelint\n // declare global: coffeelint\n
\n \n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("lint", "coffeescript", function(text) {\n CodeMirror.registerHelper("lint", "coffeescript", function(text) {\n
var found = [];\n var found = [];\n
var parseError = function(err) {\n var parseError = function(err) {\n
...@@ -48,7 +61,8 @@ CodeMirror.registerHelper("lint", "coffeescript", function(text) {\n ...@@ -48,7 +61,8 @@ CodeMirror.registerHelper("lint", "coffeescript", function(text) {\n
}\n }\n
return found;\n return found;\n
});\n });\n
CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated\n \n
});\n
]]></string> </value> ]]></string> </value>
...@@ -59,7 +73,7 @@ CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated\n ...@@ -59,7 +73,7 @@ CodeMirror.coffeeValidator = CodeMirror.lint.coffeescript; // deprecated\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>882</int> </value> <value> <int>1270</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403072.99</string> </value> <value> <string>ts21898625.13</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,12 +22,26 @@ ...@@ -22,12 +22,26 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
// Depends on csslint.js from https://github.com/stubbornella/csslint\n // Depends on csslint.js from https://github.com/stubbornella/csslint\n
\n \n
// declare global: CSSLint\n // declare global: CSSLint\n
\n \n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("lint", "css", function(text) {\n CodeMirror.registerHelper("lint", "css", function(text) {\n
var found = [];\n var found = [];\n
if (!window.CSSLint) return found;\n
var results = CSSLint.verify(text), messages = results.messages, message = null;\n var results = CSSLint.verify(text), messages = results.messages, message = null;\n
for ( var i = 0; i < messages.length; i++) {\n for ( var i = 0; i < messages.length; i++) {\n
message = messages[i];\n message = messages[i];\n
...@@ -41,6 +55,8 @@ CodeMirror.registerHelper("lint", "css", function(text) {\n ...@@ -41,6 +55,8 @@ CodeMirror.registerHelper("lint", "css", function(text) {\n
}\n }\n
return found;\n return found;\n
});\n });\n
\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -51,7 +67,7 @@ CodeMirror.registerHelper("lint", "css", function(text) {\n ...@@ -51,7 +67,7 @@ CodeMirror.registerHelper("lint", "css", function(text) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>648</int> </value> <value> <int>1146</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403073.05</string> </value> <value> <string>ts21897120.51</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
// declare global: JSHINT\n // declare global: JSHINT\n
\n \n
...@@ -36,6 +46,7 @@ ...@@ -36,6 +46,7 @@
"Unclosed string", "Stopping, unable to continue" ];\n "Unclosed string", "Stopping, unable to continue" ];\n
\n \n
function validator(text, options) {\n function validator(text, options) {\n
if (!window.JSHINT) return [];\n
JSHINT(text, options);\n JSHINT(text, options);\n
var errors = JSHINT.data().errors, result = [];\n var errors = JSHINT.data().errors, result = [];\n
if (errors) parseErrors(errors, result);\n if (errors) parseErrors(errors, result);\n
...@@ -43,7 +54,6 @@ ...@@ -43,7 +54,6 @@
}\n }\n
\n \n
CodeMirror.registerHelper("lint", "javascript", validator);\n CodeMirror.registerHelper("lint", "javascript", validator);\n
CodeMirror.javascriptValidator = CodeMirror.lint.javascript; // deprecated\n
\n \n
function cleanup(error) {\n function cleanup(error) {\n
// All problems are warnings by default\n // All problems are warnings by default\n
...@@ -147,7 +157,7 @@ ...@@ -147,7 +157,7 @@
}\n }\n
}\n }\n
}\n }\n
})();\n });\n
]]></string> </value> ]]></string> </value>
...@@ -158,7 +168,7 @@ ...@@ -158,7 +168,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>4069</int> </value> <value> <int>4452</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403073.16</string> </value> <value> <string>ts21897120.37</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -20,10 +20,25 @@ ...@@ -20,10 +20,25 @@
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>// Depends on jsonlint.js from https://github.com/zaach/jsonlint\n <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
// Depends on jsonlint.js from https://github.com/zaach/jsonlint\n
\n \n
// declare global: jsonlint\n // declare global: jsonlint\n
\n \n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.registerHelper("lint", "json", function(text) {\n CodeMirror.registerHelper("lint", "json", function(text) {\n
var found = [];\n var found = [];\n
jsonlint.parseError = function(str, hash) {\n jsonlint.parseError = function(str, hash) {\n
...@@ -36,8 +51,11 @@ CodeMirror.registerHelper("lint", "json", function(text) {\n ...@@ -36,8 +51,11 @@ CodeMirror.registerHelper("lint", "json", function(text) {\n
catch(e) {}\n catch(e) {}\n
return found;\n return found;\n
});\n });\n
CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated\n \n
</string> </value> });\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -45,7 +63,7 @@ CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated\n ...@@ -45,7 +63,7 @@ CodeMirror.jsonValidator = CodeMirror.lint.json; // deprecated\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>556</int> </value> <value> <int>954</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403072.72</string> </value> <value> <string>ts21898385.1</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,10 +22,19 @@ ...@@ -22,10 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n "use strict";\n
var GUTTER_ID = "CodeMirror-lint-markers";\n var GUTTER_ID = "CodeMirror-lint-markers";\n
var SEVERITIES = /^(?:error|warning)$/;\n
\n \n
function showTooltip(e, content) {\n function showTooltip(e, content) {\n
var tt = document.createElement("div");\n var tt = document.createElement("div");\n
...@@ -124,7 +133,7 @@ ...@@ -124,7 +133,7 @@
\n \n
function annotationTooltip(ann) {\n function annotationTooltip(ann) {\n
var severity = ann.severity;\n var severity = ann.severity;\n
if (!SEVERITIES.test(severity)) severity = "error";\n if (!severity) severity = "error";\n
var tip = document.createElement("div");\n var tip = document.createElement("div");\n
tip.className = "CodeMirror-lint-message-" + severity;\n tip.className = "CodeMirror-lint-message-" + severity;\n
tip.appendChild(document.createTextNode(ann.message));\n tip.appendChild(document.createTextNode(ann.message));\n
...@@ -133,10 +142,11 @@ ...@@ -133,10 +142,11 @@
\n \n
function startLinting(cm) {\n function startLinting(cm) {\n
var state = cm.state.lint, options = state.options;\n var state = cm.state.lint, options = state.options;\n
var passOptions = options.options || options; // Support deprecated passing of `options` property in options\n
if (options.async)\n if (options.async)\n
options.getAnnotations(cm, updateLinting, options);\n options.getAnnotations(cm.getValue(), updateLinting, passOptions, cm);\n
else\n else\n
updateLinting(cm, options.getAnnotations(cm.getValue(), options.options));\n updateLinting(cm, options.getAnnotations(cm.getValue(), passOptions, cm));\n
}\n }\n
\n \n
function updateLinting(cm, annotationsNotSorted) {\n function updateLinting(cm, annotationsNotSorted) {\n
...@@ -155,7 +165,7 @@ ...@@ -155,7 +165,7 @@
for (var i = 0; i < anns.length; ++i) {\n for (var i = 0; i < anns.length; ++i) {\n
var ann = anns[i];\n var ann = anns[i];\n
var severity = ann.severity;\n var severity = ann.severity;\n
if (!SEVERITIES.test(severity)) severity = "error";\n if (!severity) severity = "error";\n
maxSeverity = getMaxSeverity(maxSeverity, severity);\n maxSeverity = getMaxSeverity(maxSeverity, severity);\n
\n \n
if (options.formatAnnotation) ann = options.formatAnnotation(ann);\n if (options.formatAnnotation) ann = options.formatAnnotation(ann);\n
...@@ -184,25 +194,19 @@ ...@@ -184,25 +194,19 @@
var target = e.target || e.srcElement;\n var target = e.target || e.srcElement;\n
showTooltipFor(e, annotationTooltip(ann), target);\n showTooltipFor(e, annotationTooltip(ann), target);\n
}\n }\n
\n
// When the mouseover fires, the cursor might not actually be over\n
// the character itself yet. These pairs of x,y offsets are used to\n
// probe a few nearby points when no suitable marked range is found.\n
var nearby = [0, 0, 0, 5, 0, -5, 5, 0, -5, 0];\n
\n \n
function onMouseOver(cm, e) {\n function onMouseOver(cm, e) {\n
if (!/\\bCodeMirror-lint-mark-/.test((e.target || e.srcElement).className)) return;\n var target = e.target || e.srcElement;\n
for (var i = 0; i < nearby.length; i += 2) {\n if (!/\\bCodeMirror-lint-mark-/.test(target.className)) return;\n
var spans = cm.findMarksAt(cm.coordsChar({left: e.clientX + nearby[i],\n var box = target.getBoundingClientRect(), x = (box.left + box.right) / 2, y = (box.top + box.bottom) / 2;\n
top: e.clientY + nearby[i + 1]}));\n var spans = cm.findMarksAt(cm.coordsChar({left: x, top: y}, "client"));\n
for (var j = 0; j < spans.length; ++j) {\n for (var i = 0; i < spans.length; ++i) {\n
var span = spans[j], ann = span.__annotation;\n var ann = spans[i].__annotation;\n
if (ann) return popupSpanTooltip(ann, e);\n if (ann) return popupSpanTooltip(ann, e);\n
}\n
}\n }\n
}\n }\n
\n \n
function optionHandler(cm, val, old) {\n CodeMirror.defineOption("lint", false, function(cm, val, old) {\n
if (old && old != CodeMirror.Init) {\n if (old && old != CodeMirror.Init) {\n
clearMarks(cm);\n clearMarks(cm);\n
cm.off("change", onChange);\n cm.off("change", onChange);\n
...@@ -220,11 +224,8 @@ ...@@ -220,11 +224,8 @@
\n \n
startLinting(cm);\n startLinting(cm);\n
}\n }\n
}\n });\n
\n });\n
CodeMirror.defineOption("lintWith", false, optionHandler); // deprecated\n
CodeMirror.defineOption("lint", false, optionHandler); // deprecated\n
})();\n
]]></string> </value> ]]></string> </value>
...@@ -235,7 +236,7 @@ ...@@ -235,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>6962</int> </value> <value> <int>7036</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403072.85</string> </value> <value> <string>ts21897120.75</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -20,7 +20,22 @@ ...@@ -20,7 +20,22 @@
</item> </item>
<item> <item>
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string>// Depends on js-yaml.js from https://github.com/nodeca/js-yaml\n <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
// Depends on js-yaml.js from https://github.com/nodeca/js-yaml\n
\n \n
// declare global: jsyaml\n // declare global: jsyaml\n
\n \n
...@@ -33,8 +48,11 @@ CodeMirror.registerHelper("lint", "yaml", function(text) {\n ...@@ -33,8 +48,11 @@ CodeMirror.registerHelper("lint", "yaml", function(text) {\n
}\n }\n
return found;\n return found;\n
});\n });\n
CodeMirror.yamlValidator = CodeMirror.lint.yaml; // deprecated\n \n
</string> </value> });\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>precondition</string> </key> <key> <string>precondition</string> </key>
...@@ -42,7 +60,7 @@ CodeMirror.yamlValidator = CodeMirror.lint.yaml; // deprecated\n ...@@ -42,7 +60,7 @@ CodeMirror.yamlValidator = CodeMirror.lint.yaml; // deprecated\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>450</int> </value> <value> <int>848</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -88,6 +88,12 @@ ...@@ -88,6 +88,12 @@
color: #44c;\n color: #44c;\n
}\n }\n
\n \n
.CodeMirror-merge-copy-reverse {\n
position: absolute;\n
cursor: pointer;\n
color: #44c;\n
}\n
\n
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }\n .CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }\n
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }\n .CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }\n
\n \n
...@@ -116,6 +122,20 @@ ...@@ -116,6 +122,20 @@
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }\n .CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }\n
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }\n .CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }\n
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }\n .CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }\n
\n
.CodeMirror-merge-collapsed-widget:before {\n
content: "(...)";\n
}\n
.CodeMirror-merge-collapsed-widget {\n
cursor: pointer;\n
color: #88b;\n
background: #eef;\n
border: 1px solid #ddf;\n
font-size: 90%;\n
padding: 0 3px;\n
border-radius: 4px;\n
}\n
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }\n
</string> </value> </string> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.72</string> </value> <value> <string>ts21897115.91</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,7 +22,17 @@ ...@@ -22,7 +22,17 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
(function() {\n // CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"), "cjs");\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], function(CM) { mod(CM, "amd"); });\n
else // Plain browser env\n
mod(CodeMirror, "plain");\n
})(function(CodeMirror, env) {\n
if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js";\n if (!CodeMirror.modeURL) CodeMirror.modeURL = "../mode/%N/%N.js";\n
\n \n
var loading = {};\n var loading = {};\n
...@@ -49,21 +59,24 @@ ...@@ -49,21 +59,24 @@
if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont);\n if (CodeMirror.modes.hasOwnProperty(mode)) return ensureDeps(mode, cont);\n
if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);\n if (loading.hasOwnProperty(mode)) return loading[mode].push(cont);\n
\n \n
var script = document.createElement("script");\n var file = CodeMirror.modeURL.replace(/%N/g, mode);\n
script.src = CodeMirror.modeURL.replace(/%N/g, mode);\n if (env == "plain") {\n
var others = document.getElementsByTagName("script")[0];\n var script = document.createElement("script");\n
others.parentNode.insertBefore(script, others);\n script.src = file;\n
var list = loading[mode] = [cont];\n var others = document.getElementsByTagName("script")[0];\n
var count = 0, poll = setInterval(function() {\n var list = loading[mode] = [cont];\n
if (++count > 100) return clearInterval(poll);\n CodeMirror.on(script, "load", function() {\n
if (CodeMirror.modes.hasOwnProperty(mode)) {\n
clearInterval(poll);\n
loading[mode] = null;\n
ensureDeps(mode, function() {\n ensureDeps(mode, function() {\n
for (var i = 0; i < list.length; ++i) list[i]();\n for (var i = 0; i < list.length; ++i) list[i]();\n
});\n });\n
}\n });\n
}, 200);\n others.parentNode.insertBefore(script, others);\n
} else if (env == "cjs") {\n
require(file);\n
cont();\n
} else if (env == "amd") {\n
requirejs([file], cont);\n
}\n
};\n };\n
\n \n
CodeMirror.autoLoadMode = function(instance, mode) {\n CodeMirror.autoLoadMode = function(instance, mode) {\n
...@@ -72,7 +85,7 @@ ...@@ -72,7 +85,7 @@
instance.setOption("mode", instance.getOption("mode"));\n instance.setOption("mode", instance.getOption("mode"));\n
});\n });\n
};\n };\n
}());\n });\n
]]></string> </value> ]]></string> </value>
...@@ -83,7 +96,7 @@ ...@@ -83,7 +96,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>1787</int> </value> <value> <int>2277</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts93403077.58</string> </value> <value> <string>ts21897116.0</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -22,6 +22,19 @@ ...@@ -22,6 +22,19 @@
<key> <string>data</string> </key> <key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
// CodeMirror, copyright (c) by Marijn Haverbeke and others\n
// Distributed under an MIT license: http://codemirror.net/LICENSE\n
\n
(function(mod) {\n
if (typeof exports == "object" && typeof module == "object") // CommonJS\n
mod(require("../../lib/codemirror"));\n
else if (typeof define == "function" && define.amd) // AMD\n
define(["../../lib/codemirror"], mod);\n
else // Plain browser env\n
mod(CodeMirror);\n
})(function(CodeMirror) {\n
"use strict";\n
\n
CodeMirror.multiplexingMode = function(outer /*, others */) {\n CodeMirror.multiplexingMode = function(outer /*, others */) {\n
// Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects\n // Others should be {open, close, mode [, delimStyle] [, innerStyle]} objects\n
var others = Array.prototype.slice.call(arguments, 1);\n var others = Array.prototype.slice.call(arguments, 1);\n
...@@ -125,6 +138,8 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {\n ...@@ -125,6 +138,8 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {\n
}\n }\n
};\n };\n
};\n };\n
\n
});\n
]]></string> </value> ]]></string> </value>
...@@ -135,7 +150,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {\n ...@@ -135,7 +150,7 @@ CodeMirror.multiplexingMode = function(outer /*, others */) {\n
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>3736</int> </value> <value> <int>4197</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment