removes a second and useless definition for 'markdownize'
This commit is contained in:
parent
a347637a8e
commit
25bfd478cf
1 changed files with 6 additions and 17 deletions
|
|
@ -6,21 +6,10 @@ var markdownize = function(content) {
|
|||
return toMarkdown(html);
|
||||
};
|
||||
|
||||
var converter = new showdown.Converter();
|
||||
var markdownize = function(content) {
|
||||
if (!content) return '';
|
||||
var html = content.split("\n").map($.trim).filter(function(line) {
|
||||
return line != "";
|
||||
}).join("\n");
|
||||
var md = toMarkdown(html);
|
||||
console.log(md);
|
||||
return md;
|
||||
};
|
||||
var htmlize = function(content) {
|
||||
return converter.makeHtml(content);
|
||||
};
|
||||
var updateHtml = function(id,content) {
|
||||
var jView = jQuery('*[for="'+id+'"]');
|
||||
var updateHtml = function(jView,content) {
|
||||
if (markdownize(jView.html()) === content) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -37,6 +26,6 @@ var markdownize = function(content) {
|
|||
jQuery('#'+id).val( markdown );
|
||||
};
|
||||
var onMDModified = ( function (event, data) {
|
||||
$('#Submit').addClass('dirty');
|
||||
$('#Submit').addClass('success');
|
||||
updateMD(this.attributes["for"].value, data.content);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue