Replace markdown with marked.

This commit is contained in:
Lars Jung 2014-08-03 21:12:40 +02:00
parent 114c63cfd7
commit 7ecefa554a
7 changed files with 1281 additions and 1733 deletions

View file

@ -6,6 +6,7 @@
* removes True Type fonts
* outsources themes to [h5ai-themes](https://github.com/lrsjng/h5ai-themes)
* replaces `markdown` with [`marked`](https://github.com/chjj/marked)
## v0.25.2 - *2014-07-01*

View file

@ -59,7 +59,7 @@ THE SOFTWARE.
[jQuery.mousewheel](https://github.com/brandonaaron/jquery-mousewheel) (MIT),
[jQuery.qrcode](http://larsjung.de/qrcode/) (MIT),
[jQuery.scrollpanel](http://larsjung.de/scrollpanel/) (MIT),
[markdown-js](https://github.com/evilstreak/markdown-js) (MIT),
[marked](https://github.com/chjj/marked) (MIT),
[Modernizr](http://www.modernizr.com) (MIT/BSD),
[modulejs](http://larsjung.de/modulejs/) (MIT),
[Moment.js](http://momentjs.com) (MIT),

View file

@ -1,5 +1,5 @@
modulejs.define('ext/custom', ['_', '$', 'markdown', 'core/settings', 'core/server', 'core/event', 'core/resource'], function (_, $, markdown, allsettings, server, event, resource) {
modulejs.define('ext/custom', ['_', '$', 'marked', 'core/settings', 'core/server', 'core/event', 'core/resource'], function (_, $, marked, allsettings, server, event, resource) {
var settings = _.extend({
enabled: false
@ -20,7 +20,7 @@ modulejs.define('ext/custom', ['_', '$', 'markdown', 'core/settings', 'core/serv
if (data.header) {
content = data.header;
if (data.header_type === 'md') {
content = markdown.toHTML(content);
content = marked(content);
}
$header.html(content).stop().slideDown(duration);
has_header = true;
@ -29,7 +29,7 @@ modulejs.define('ext/custom', ['_', '$', 'markdown', 'core/settings', 'core/serv
if (data.footer) {
content = data.footer;
if (data.footer_type === 'md') {
content = markdown.toHTML(content);
content = marked(content);
}
$footer.html(content).stop().slideDown(duration);
has_footer = true;

View file

@ -1,5 +1,5 @@
modulejs.define('ext/preview-txt', ['_', '$', 'markdown', 'core/settings', 'core/event', 'core/resource', 'ext/preview'], function (_, $, markdown, allsettings, event, resource, preview) {
modulejs.define('ext/preview-txt', ['_', '$', 'marked', 'core/settings', 'core/event', 'core/resource', 'ext/preview'], function (_, $, marked, allsettings, event, resource, preview) {
var settings = _.extend({
enabled: false,
@ -106,7 +106,7 @@ modulejs.define('ext/preview-txt', ['_', '$', 'markdown', 'core/settings', 'core
} else if (settings.types[currentItem.type] === 'markdown') {
$text = $(templateMarkdown).html(markdown.toHTML(textContent));
$text = $(templateMarkdown).html(marked(textContent));
} else {
$text = $(templateText).text(textContent);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
// ----------
// @include "lib/modernizr-*.js"
// @include "lib/underscore-*.js"
// @include "lib/markdown-*.js"
// @include "lib/marked-*.js"
// @include "lib/modulejs-*.js"
// @include "lib/moment-*.js"
@ -19,7 +19,7 @@
/*global jQuery, markdown, Modernizr, moment, _ */
modulejs.define('$', function () { return jQuery; });
modulejs.define('markdown', function () { return markdown; });
modulejs.define('marked', function () { return marked; });
modulejs.define('modernizr', function () { return Modernizr; });
modulejs.define('moment', function () { return moment; });
modulejs.define('_', function () { return _; });