Skip to content

Commit ae8fe9a

Browse files
committed
Fixed some minification encoding errors with documentation.
1 parent 4d286b8 commit ae8fe9a

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
** If you add anything here, also add it to scripts.json **
3131
-->
3232
<script src="js/third-party/codemirror.js"></script>
33+
<script src="js/utils/Utils.js"></script>
34+
<script src="js/documentation.js"></script>
3335
<script src="js/third-party/promise-0.1.1.js"></script>
3436
<script src="js/third-party/ZeroClipboard.js"></script>
3537
<script src="js/third-party/classList.js"></script>
@@ -39,7 +41,6 @@
3941
<script src="js/third-party/history.js"></script>
4042
<script src="js/events/Event.js"></script>
4143
<script src="js/events/EventDispatcher.js"></script>
42-
<script src="js/utils/Utils.js"></script>
4344
<script src="js/Tracking.js"></script>
4445
<script src="js/BrowserHistory.js"></script>
4546
<script src="js/events/DataEvent.js"></script>
@@ -62,7 +63,6 @@
6263
<script src="js/views/ShareMenu.js"></script>
6364
<script src="js/views/SaveMenu.js"></script>
6465
<script src="js/utils/Docs.js"></script>
65-
<script src="js/documentation.js"></script>
6666
<script src="js/RegExLexer.js"></script>
6767
<script src="js/SubstLexer.js"></script>
6868
<script src="js/net/ServerModel.js"></script>

js/documentation.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -527,16 +527,6 @@ var errors = {
527527
// infinite is handled in the Help section.
528528
};
529529

530-
// add escaped characters to the reference:
531-
var reference = library.kids[1];
532-
var chars = "\t\n\v\f\r\0.\\+*?^$[]{}()|/";
533-
var tokens = "tnvfr0";
534-
var kids = reference.kids[2].kids;
535-
for (var i=0; i<chars.length; i++) {
536-
kids.push(Docs.getEscCharDocs(chars[i], tokens[i], misc.kids[0].tip));
537-
}
538-
539-
540530
/*
541531
// add the "All" reference section. This is kind of fragile at the moment.
542532
kids = reference.kids;
@@ -560,7 +550,6 @@ for (i=0; i<kids.length; i++) {
560550
}
561551
//*/
562552

563-
564-
Docs.setContent({errors:errors, library:library, misc:misc});
553+
window.documentation = {library:library, misc:misc, errors:errors};
565554

566555
})();

js/utils/Docs.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,17 @@ Docs.getEscCharDocs = function(c, t, template) {
163163
Docs.getCtrlKey = function() {
164164
return Utils.getCtrlKey();
165165
};
166+
167+
// Inject text from the documentation file.
168+
(function() {
169+
// add escaped characters to the reference:
170+
var reference = documentation.library.kids[1];
171+
var chars = "\t\n\v\f\r\0.\\+*?^$[]{}()|/";
172+
var tokens = "tnvfr0";
173+
var kids = reference.kids[2].kids;
174+
for (var i=0; i<chars.length; i++) {
175+
kids.push(Docs.getEscCharDocs(chars[i], tokens[i], documentation.misc.kids[0].tip));
176+
}
177+
178+
Docs.setContent({errors:documentation.errors, library:documentation.library, misc:documentation.misc});
179+
})();

scripts.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"yui": [
3-
"js/third-party/codemirror.js"
3+
"js/third-party/codemirror.js",
4+
"js/utils/TextUtils.js",
5+
"js/documentation.js"
46
],
57
"uglify": [
68
"js/third-party/promise-0.1.1.js",
7-
"js/third-party/ZeroClipboard.js",
89
"js/third-party/classList.js",
10+
"js/third-party/ZeroClipboard.js",
911
"js/third-party/store.js",
1012
"js/third-party/placeholders.min.js",
1113
"js/third-party/history.adapter.native.js",
@@ -22,7 +24,6 @@
2224
"js/controls/TagInput.js",
2325
"js/utils/CMUtils.js",
2426
"js/controls/Tooltip.js",
25-
"js/utils/TextUtils.js",
2627
"js/SourceHighlighter.js",
2728
"js/ExpressionHighlighter.js",
2829
"js/ExpressionHover.js",
@@ -35,7 +36,6 @@
3536
"js/views/ShareMenu.js",
3637
"js/views/SaveMenu.js",
3738
"js/utils/Docs.js",
38-
"js/documentation.js",
3939
"js/RegExLexer.js",
4040
"js/SubstLexer.js",
4141
"js/net/ServerModel.js",

0 commit comments

Comments
 (0)