Skip to content

Commit d0e484c

Browse files
committed
Prepare release
1 parent dea86ce commit d0e484c

File tree

7 files changed

+1138
-1054
lines changed

7 files changed

+1138
-1054
lines changed

bower.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackedit",
3-
"version": "4.3.8",
3+
"version": "4.3.9",
44
"description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.",
55
"dependencies": {
66
"bootstrap": "3.0.3",
@@ -29,7 +29,7 @@
2929
"jsondiffpatch": "https://github.com/benweet/jsondiffpatch.git#fb9dddf7cd076d8ec89d376c0e9de9223e9888f9",
3030
"hammerjs": "~1.0.10",
3131
"raphael": "~2.1.2",
32-
"js-sequence-diagrams": "https://github.com/benweet/js-sequence-diagrams.git#d60c973aa0ff148dc588c7ceee0b41e59dff3f9f",
32+
"js-sequence-diagrams": "https://github.com/benweet/js-sequence-diagrams.git#c59e2e39d9185e9291f37b73fc596eba5ed33650",
3333
"flowchart": "https://github.com/adrai/flowchart.js.git#751717d3db6437def9a5f8b1cb73e8bb81b5833a",
3434
"monetizejs": "~0.2.0",
3535
"MathJax": "~2.4.0",

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackedit",
3-
"version": "4.3.8",
3+
"version": "4.3.9",
44
"private": true,
55
"description": "StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.",
66
"main": "res/main.js",
@@ -22,7 +22,7 @@
2222
"gulp": "^3.8.7",
2323
"gulp-requirejs": "^0.1.3",
2424
"gulp-jshint": "^1.8.4",
25-
"gulp-uglify": "^1.0.0",
25+
"gulp-uglify": "^1.1.0",
2626
"gulp-less": "^1.3.5",
2727
"bower-requirejs": "^1.1.0",
2828
"gulp-inject": "git://github.com/benweet/gulp-inject.git#8bd702d143a578e3b44290d82612ab808ee17281",

public/cache.manifest

+70-70
Large diffs are not rendered by default.

public/res-min/main.js

+1,007-938
Large diffs are not rendered by default.

public/res-min/require.js

+48-40
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** vim: et:ts=4:sw=4:sts=4
2-
* @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
2+
* @license RequireJS 2.1.15 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -12,7 +12,7 @@ var requirejs, require, define;
1212
(function (global) {
1313
var req, s, head, baseElement, dataMain, src,
1414
interactiveScript, currentlyAddingScript, mainScript, subPath,
15-
version = '2.1.11',
15+
version = '2.1.15',
1616
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
1717
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
1818
jsSuffixRegExp = /\.js$/,
@@ -180,7 +180,7 @@ var requirejs, require, define;
180180

181181
if (typeof requirejs !== 'undefined') {
182182
if (isFunction(requirejs)) {
183-
//Do not overwrite and existing requirejs instance.
183+
//Do not overwrite an existing requirejs instance.
184184
return;
185185
}
186186
cfg = requirejs;
@@ -232,21 +232,20 @@ var requirejs, require, define;
232232
* @param {Array} ary the array of path segments.
233233
*/
234234
function trimDots(ary) {
235-
var i, part, length = ary.length;
236-
for (i = 0; i < length; i++) {
235+
var i, part;
236+
for (i = 0; i < ary.length; i++) {
237237
part = ary[i];
238238
if (part === '.') {
239239
ary.splice(i, 1);
240240
i -= 1;
241241
} else if (part === '..') {
242-
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
243-
//End of the line. Keep at least one non-dot
244-
//path segment at the front so it can be mapped
245-
//correctly to disk. Otherwise, there is likely
246-
//no path mapping for a path starting with '..'.
247-
//This can still fail, but catches the most reasonable
248-
//uses of ..
249-
break;
242+
// If at the start, or previous value is still ..,
243+
// keep them so that when converted to a path it may
244+
// still work when converted to a path, even though
245+
// as an ID it is less than ideal. In larger point
246+
// releases, may be better to just kick out an error.
247+
if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {
248+
continue;
250249
} else if (i > 0) {
251250
ary.splice(i - 1, 2);
252251
i -= 2;
@@ -267,43 +266,37 @@ var requirejs, require, define;
267266
*/
268267
function normalize(name, baseName, applyMap) {
269268
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
270-
foundMap, foundI, foundStarMap, starI,
271-
baseParts = baseName && baseName.split('/'),
272-
normalizedBaseParts = baseParts,
269+
foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
270+
baseParts = (baseName && baseName.split('/')),
273271
map = config.map,
274272
starMap = map && map['*'];
275273

276274
//Adjust any relative paths.
277-
if (name && name.charAt(0) === '.') {
278-
//If have a base name, try to normalize against it,
279-
//otherwise, assume it is a top-level require that will
280-
//be relative to baseUrl in the end.
281-
if (baseName) {
275+
if (name) {
276+
name = name.split('/');
277+
lastIndex = name.length - 1;
278+
279+
// If wanting node ID compatibility, strip .js from end
280+
// of IDs. Have to do this here, and not in nameToUrl
281+
// because node allows either .js or non .js to map
282+
// to same file.
283+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
284+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
285+
}
286+
287+
// Starts with a '.' so need the baseName
288+
if (name[0].charAt(0) === '.' && baseParts) {
282289
//Convert baseName to array, and lop off the last part,
283290
//so that . matches that 'directory' and not name of the baseName's
284291
//module. For instance, baseName of 'one/two/three', maps to
285292
//'one/two/three.js', but we want the directory, 'one/two' for
286293
//this normalization.
287294
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
288-
name = name.split('/');
289-
lastIndex = name.length - 1;
290-
291-
// If wanting node ID compatibility, strip .js from end
292-
// of IDs. Have to do this here, and not in nameToUrl
293-
// because node allows either .js or non .js to map
294-
// to same file.
295-
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
296-
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
297-
}
298-
299295
name = normalizedBaseParts.concat(name);
300-
trimDots(name);
301-
name = name.join('/');
302-
} else if (name.indexOf('./') === 0) {
303-
// No baseName, so this is ID is resolved relative
304-
// to baseUrl, pull off the leading dot.
305-
name = name.substring(2);
306296
}
297+
298+
trimDots(name);
299+
name = name.join('/');
307300
}
308301

309302
//Apply map config if available.
@@ -379,7 +372,13 @@ var requirejs, require, define;
379372
//retry
380373
pathConfig.shift();
381374
context.require.undef(id);
382-
context.require([id]);
375+
376+
//Custom require that does not do map translation, since
377+
//ID is "absolute", already mapped/resolved.
378+
context.makeRequire(null, {
379+
skipMap: true
380+
})([id]);
381+
383382
return true;
384383
}
385384
}
@@ -445,7 +444,16 @@ var requirejs, require, define;
445444
return normalize(name, parentName, applyMap);
446445
});
447446
} else {
448-
normalizedName = normalize(name, parentName, applyMap);
447+
// If nested plugin references, then do not try to
448+
// normalize, as it will not normalize correctly. This
449+
// places a restriction on resourceIds, and the longer
450+
// term solution is not to normalize until plugins are
451+
// loaded and all normalizations to allow for async
452+
// loading of a loader plugin. But for now, fixes the
453+
// common uses. Details in #1131
454+
normalizedName = name.indexOf('!') === -1 ?
455+
normalize(name, parentName, applyMap) :
456+
name;
449457
}
450458
} else {
451459
//A regular module.

public/res/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
define([], function() {
22
var constants = {};
3-
constants.VERSION = "4.3.8";
3+
constants.VERSION = "4.3.9";
44
constants.MAIN_URL = "https://stackedit.io/";
55
constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";
66
constants.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";

public/res/eventMgr.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,14 @@ define([
231231
setTimeout(function() {
232232
var html = "";
233233
_.each(previewContentsElt.children, function(elt) {
234-
html += elt.innerHTML;
234+
if(!elt.exportableHtml) {
235+
var clonedElt = elt.cloneNode(true);
236+
_.each(clonedElt.querySelectorAll('.MathJax, .MathJax_Display, .MathJax_Preview'), function(elt) {
237+
elt.parentNode.removeChild(elt);
238+
});
239+
elt.exportableHtml = clonedElt.innerHTML;
240+
}
241+
html += elt.exportableHtml;
235242
});
236243
var htmlWithComments = utils.trim(html);
237244
var htmlWithoutComments = htmlWithComments.replace(/ <span class="comment label label-danger">.*?<\/span> /g, '');

0 commit comments

Comments
 (0)