using tent-markdown-js now
This commit is contained in:
parent
91600015b9
commit
ff09134479
1 changed files with 4 additions and 9 deletions
|
@ -3,11 +3,12 @@ define([
|
|||
"helper/APICalls",
|
||||
"lib/URI",
|
||||
"helper/HostApp",
|
||||
"lib/Markdown",
|
||||
"lib/Timeago",
|
||||
"lib/SingleDoubleClick"
|
||||
],
|
||||
|
||||
function(jQuery, APICalls, URI, HostApp) {
|
||||
function(jQuery, APICalls, URI, HostApp, Markdown) {
|
||||
|
||||
function Core() {
|
||||
this.saveScrollTop = 0;
|
||||
|
@ -660,14 +661,8 @@ function(jQuery, APICalls, URI, HostApp) {
|
|||
}
|
||||
|
||||
Core.prototype.replaceURLWithHTMLLinks = function(text, entities, message_node) {
|
||||
// FIXME: this has to be done better so one can nest that stuff and escape with \
|
||||
return text.replace(/_([^_]+)_/g, "<em>$1</em>")
|
||||
.replace(/\*([^\*]+)\*/g, "<strong>$1</strong>")
|
||||
.replace(/`([^`]+)`/g, "<code>$1</code>")
|
||||
.replace(/~([^~]+)~/g, "<del>$1</del>")
|
||||
.replace(/\#([^\s]+)/g, "<a class='hash' href=\"javascript:bungloo.search.searchFor('$1')\">#$1</a>")
|
||||
.replace(/(^|[^\^])\[([^\]]+)\]\(([^\)]+)\)/g, "$1<a class='link' href='javascript:controller.openURL(\"$3\");'>$2</a>")
|
||||
.replace(/\^\[([^\]]+)\]\((\d+)\)/g, "<a class='name' href='#' onclick='bungloo.entityProfile.showEntity(this, $2); return false;'>$1</a>");
|
||||
return Markdown.toHTML( text, 'Tent', { footnotes: entities } )
|
||||
.replace(/\^<a/g, "<a"); // hack to remove the ^ before tent names
|
||||
}
|
||||
|
||||
Core.prototype.parseForMedia = function(text, images) {
|
||||
|
|
Reference in a new issue