mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-07-22 14:30:41 -04:00
adding tests for PasteViewer class
This commit is contained in:
parent
10ee37b35c
commit
c6ddee317d
4 changed files with 78 additions and 4 deletions
|
@ -1839,7 +1839,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
*
|
||||
* @name PasteViewer.setFormat
|
||||
* @function
|
||||
* @param {string} newFormat the the new format
|
||||
* @param {string} newFormat the new format
|
||||
*/
|
||||
me.setFormat = function(newFormat)
|
||||
{
|
||||
|
@ -1848,7 +1848,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
return;
|
||||
}
|
||||
|
||||
// needs to update display too, if from or to Markdown is switched
|
||||
// needs to update display too, if we switch from or to Markdown
|
||||
if (format === 'markdown' || newFormat === 'markdown') {
|
||||
isDisplayed = false;
|
||||
}
|
||||
|
@ -1977,6 +1977,9 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) {
|
|||
|
||||
// get default option from template/HTML or fall back to set value
|
||||
format = Model.getFormatDefault() || format;
|
||||
text = '';
|
||||
isDisplayed = false;
|
||||
isChanged = true;
|
||||
}
|
||||
|
||||
return me;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue