Beta release

This commit is contained in:
benweet 2014-04-21 21:39:41 +01:00
parent 379ee55372
commit d4c3e83cde
6 changed files with 49 additions and 45 deletions

View File

@ -1,6 +1,6 @@
{
"name": "stackedit",
"version": "3.99.0",
"version": "3.99.1",
"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.",
"dependencies": {
"bootstrap": "3.0.3",

View File

@ -1,9 +1,12 @@
{
"name": "stackedit",
"version": "3.99.0",
"version": "3.99.1",
"private": true,
"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.",
"main": "res/main.js",
"engines": {
"node": "0.10.x"
},
"directories": {
"doc": "doc"
},

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
#Date Mon Apr 21 2014 18:50:39
#Date Mon Apr 21 2014 21:11:15
CACHE:
res/worker.js

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
define([], function() {
var constants = {};
constants.VERSION = "3.99.0";
constants.VERSION = "3.99.1";
constants.MAIN_URL = "https://stackedit.io/";
constants.GOOGLE_ANALYTICS_ACCOUNT_ID = "UA-39556145-1";
constants.GOOGLE_API_KEY = "AIzaSyAeCU8CGcSkn0z9js6iocHuPBX4f_mMWkw";

View File

@ -4,7 +4,7 @@ if (typeof exports === "object" && typeof require === "function") // we're in a
Markdown = exports;
else
Markdown = {};
// The following text is included for historical reasons, but should
// be taken with a pinch of salt; it's not all true anymore.
@ -110,28 +110,28 @@ else
this.setOptions = function(optionsParam) {
options = optionsParam;
};
var pluginHooks = this.hooks = new HookCollection();
// given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
pluginHooks.addNoop("plainLinkText");
// called with the orignal text as given to makeHtml. The result of this plugin hook is the actual markdown source that will be cooked
pluginHooks.addNoop("preConversion");
// called with the text once all normalizations have been completed (tabs to spaces, line endings, etc.), but before any conversions have
pluginHooks.addNoop("postNormalization");
// Called with the text before / after creating block elements like code blocks and lists. Note that this is called recursively
// with inner content, e.g. it's called with the full text, and then only with the content of a blockquote. The inner
// call will receive outdented text.
pluginHooks.addNoop("preBlockGamut");
pluginHooks.addNoop("postBlockGamut");
// called with the text of a single block element before / after the span-level conversions (bold, code spans, etc.) have been made
pluginHooks.addNoop("preSpanGamut");
pluginHooks.addNoop("postSpanGamut");
// called with the final cooked HTML code. The result of this plugin hook is the actual output of makeHtml
pluginHooks.addNoop("postConversion");
@ -161,7 +161,7 @@ else
// Don't do that.
if (g_urls)
throw new Error("Recursive call to converter.makeHtml");
// Create the private state objects.
g_urls = new SaveHash();
g_titles = new SaveHash();
@ -196,7 +196,7 @@ else
// match consecutive blank lines with /\n+/ instead of something
// contorted like /[ \t]*\n+/ .
text = text.replace(/^[ \t]+$/mg, "");
text = pluginHooks.postNormalization(text);
// Turn block-level HTML blocks into hash entries
@ -332,10 +332,11 @@ else
) // attacklab: there are sentinel newlines at end of document
/gm,function(){...}};
*/
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
//text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
// Special case just for <hr />. It was easier to make a special case than
// to make the other regex more complicated.
// to make the other regex more complicated.
/*
text = text.replace(/
@ -408,7 +409,7 @@ else
return blockText;
}
var blockGamutHookCallback = function (t) { return _RunBlockGamut(t); }
function _RunBlockGamut(text, doNotUnhash) {
@ -416,9 +417,9 @@ else
// These are all the transformations that form block-level
// tags like paragraphs, headers, and list items.
//
text = pluginHooks.preBlockGamut(text, blockGamutHookCallback);
text = _DoHeaders(text);
// Do Horizontal Rules:
@ -430,7 +431,7 @@ else
text = _DoLists(text);
text = _DoCodeBlocks(text);
text = _DoBlockQuotes(text);
text = pluginHooks.postBlockGamut(text, blockGamutHookCallback);
// We already ran _HashHTMLBlocks() before, in Markdown(), but that
@ -450,7 +451,7 @@ else
//
text = pluginHooks.preSpanGamut(text);
text = _DoCodeSpans(text);
text = _EscapeSpecialCharsWithinTagAttributes(text);
text = _EncodeBackslashEscapes(text);
@ -464,15 +465,15 @@ else
// Must come after _DoAnchors(), because you can use < and >
// delimiters in inline links like [this](<url>).
text = _DoAutoLinks(text);
text = text.replace(/~P/g, "://"); // put in place to prevent autolinking; reset now
text = _EncodeAmpsAndAngles(text);
text = options._DoItalicsAndBold ? options._DoItalicsAndBold(text) : _DoItalicsAndBold(text);
// Do hard breaks:
text = text.replace(/ +\n/g, " <br>\n");
text = pluginHooks.postSpanGamut(text);
return text;
@ -484,7 +485,7 @@ else
// don't conflict with their use in Markdown for code, italics and strong.
//
// Build a regex to find HTML tags and comments. See Friedl's
// Build a regex to find HTML tags and comments. See Friedl's
// "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
// SE: changed the comment part of the regex
@ -558,7 +559,7 @@ else
|
[^()\s]
)*?
)>?
)>?
[ \t]*
( // $5
(['"]) // quote char = $6
@ -697,7 +698,7 @@ else
return text;
}
function attributeEncode(text) {
// unconditionally replace angle brackets here -- what ends up in an attribute (e.g. alt or title)
// never makes sense to have verbatim HTML in it (and the sanitizer would totally break it)
@ -730,7 +731,7 @@ else
return whole_match;
}
}
alt_text = escapeCharacters(attributeEncode(alt_text), "*_[]()");
url = escapeCharacters(url, "*_");
var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
@ -754,7 +755,7 @@ else
// Setext-style headers:
// Header 1
// ========
//
//
// Header 2
// --------
//
@ -913,7 +914,7 @@ else
//
// We changed this to behave identical to MarkdownSharp. This is the constructed RegEx,
// with {MARKER} being one of \d+[.] or [*+-], depending on list_type:
/*
list_str = list_str.replace(/
(^[ \t]*) // leading whitespace = $1
@ -962,7 +963,7 @@ else
function _DoCodeBlocks(text) {
//
// Process Markdown `<pre><code>` blocks.
//
//
/*
text = text.replace(/
@ -1010,26 +1011,26 @@ else
function _DoCodeSpans(text) {
//
// * Backtick quotes are used for <code></code> spans.
//
//
// * You can use multiple backticks as the delimiters if you want to
// include literal backticks in the code span. So, this input:
//
//
// Just type ``foo `bar` baz`` at the prompt.
//
//
// Will translate to:
//
//
// <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
//
//
// There's no arbitrary limit to the number of backticks you
// can use as delimters. If you need three consecutive backticks
// in your code, use four for delimiters, etc.
//
// * You can use spaces to get literal backticks at the edges:
//
//
// ... type `` `bar` `` ...
//
//
// Turns to:
//
//
// ... type <code>`bar`</code> ...
//
@ -1162,7 +1163,7 @@ else
var grafs = text.split(/\n{2,}/g);
var grafsOut = [];
var markerRe = /~K(\d+)K/;
//
@ -1277,7 +1278,7 @@ else
}
return "<" + protocol + link + ">" + tail;
}
function _DoAutoLinks(text) {
// note that at this point, all other URL in the text are already hyperlinked as <a href=""></a>
@ -1290,7 +1291,7 @@ else
text = text.replace(autoLinkRegex, handleTrailingParens);
// autolink anything like <http://example.com>
var replacer = function (wholematch, m1) { return "<a href=\"" + m1 + "\">" + pluginHooks.plainLinkText(m1) + "</a>"; }
text = text.replace(/<((https?|ftp):[^'">\s]+)>/gi, replacer);
@ -1372,7 +1373,7 @@ else
var _problemUrlChars = /(?:["'*()[\]:]|~D)/g;
// hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems
// hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems
function encodeProblemUrlChars(url) {
if (!url)
return "";