mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
Ensuring markdown docs use the unformatted text for raw text and clone, fixes #63
This commit is contained in:
parent
4fa2f7cd22
commit
a0c6222fec
|
@ -741,6 +741,7 @@ $(function() {
|
||||||
this.passwordInput.val(password);
|
this.passwordInput.val(password);
|
||||||
if (cleartext.length > 0)
|
if (cleartext.length > 0)
|
||||||
{
|
{
|
||||||
|
$('#pasteFormatter').val(paste.meta.formatter);
|
||||||
this.formatPaste(paste.meta.formatter, cleartext);
|
this.formatPaste(paste.meta.formatter, cleartext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1237,7 +1238,8 @@ $(function() {
|
||||||
rawText: function(event)
|
rawText: function(event)
|
||||||
{
|
{
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var paste = this.clearText.html();
|
var paste = $('#pasteFormatter').val() === 'markdown' ?
|
||||||
|
this.prettyPrint.text() : this.clearText.text();
|
||||||
var newDoc = document.open('text/html', 'replace');
|
var newDoc = document.open('text/html', 'replace');
|
||||||
newDoc.write('<pre>' + paste + '</pre>');
|
newDoc.write('<pre>' + paste + '</pre>');
|
||||||
newDoc.close();
|
newDoc.close();
|
||||||
|
@ -1262,7 +1264,10 @@ $(function() {
|
||||||
this.clonedFile.removeClass('hidden');
|
this.clonedFile.removeClass('hidden');
|
||||||
this.fileWrap.addClass('hidden');
|
this.fileWrap.addClass('hidden');
|
||||||
}
|
}
|
||||||
this.message.text(this.clearText.text());
|
this.message.text(
|
||||||
|
$('#pasteFormatter').val() === 'markdown' ?
|
||||||
|
this.prettyPrint.text() : this.clearText.text()
|
||||||
|
);
|
||||||
$('.navbar-toggle').click();
|
$('.navbar-toggle').click();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user