mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Clean up variable
This commit is contained in:
parent
66565a890c
commit
183ead4c92
@ -271,25 +271,24 @@ define([
|
||||
var bogusUncheckPtn = /<input disabled="" type="checkbox">/;
|
||||
renderer.listitem = function (text) {
|
||||
var icon = '';
|
||||
var body = text;
|
||||
if (checkedTaskItemPtn.test(text)) {
|
||||
icon = taskIconChecked;
|
||||
body = text.replace(checkedTaskItemPtn, '');
|
||||
text = text.replace(checkedTaskItemPtn, '');
|
||||
} else if (uncheckedTaskItemPtn.test(text)) {
|
||||
icon = taskIconUnchecked;
|
||||
body = text.replace(uncheckedTaskItemPtn, '');
|
||||
text = text.replace(uncheckedTaskItemPtn, '');
|
||||
} else if (bogusCheckPtn.test(text)) {
|
||||
icon = taskIconChecked;
|
||||
body = text.replace(bogusCheckPtn, '');
|
||||
text = text.replace(bogusCheckPtn, '');
|
||||
} else if (bogusUncheckPtn.test(text)) {
|
||||
icon = taskIconUnchecked;
|
||||
body = text.replace(bogusUncheckPtn, '');
|
||||
text = text.replace(bogusUncheckPtn, '');
|
||||
} else {
|
||||
return '<li>' + text + '</li>\n';
|
||||
}
|
||||
body = body.replace(/^\s+/, '').replace(/^(<p[^>]*>)\s+/i, '$1');
|
||||
text = text.replace(/^\s+/, '').replace(/^(<p[^>]*>)\s+/i, '$1');
|
||||
return '<li class="todo-list-item"><span class="cp-task-marker" aria-hidden="true">' + icon +
|
||||
'</span><div class="cp-task-body">' + body + '</div></li>\n';
|
||||
'</span><div class="cp-task-body">' + text + '</div></li>\n';
|
||||
};
|
||||
restrictedRenderer.listitem = function (text) {
|
||||
if (bogusCheckPtn.test(text)) {
|
||||
|
||||
@ -71,25 +71,24 @@ define([
|
||||
var bogusUncheckPtn = /<input disabled="" type="checkbox">/;
|
||||
renderer.listitem = function (text) {
|
||||
var icon = '';
|
||||
var body = text;
|
||||
if (checkedTaskItemPtn.test(text)) {
|
||||
icon = taskIconChecked;
|
||||
body = text.replace(checkedTaskItemPtn, '');
|
||||
text = text.replace(checkedTaskItemPtn, '');
|
||||
} else if (uncheckedTaskItemPtn.test(text)) {
|
||||
icon = taskIconUnchecked;
|
||||
body = text.replace(uncheckedTaskItemPtn, '');
|
||||
text = text.replace(uncheckedTaskItemPtn, '');
|
||||
} else if (bogusCheckPtn.test(text)) {
|
||||
icon = taskIconChecked;
|
||||
body = text.replace(bogusCheckPtn, '');
|
||||
text = text.replace(bogusCheckPtn, '');
|
||||
} else if (bogusUncheckPtn.test(text)) {
|
||||
icon = taskIconUnchecked;
|
||||
body = text.replace(bogusUncheckPtn, '');
|
||||
text = text.replace(bogusUncheckPtn, '');
|
||||
} else {
|
||||
return '<li>' + text + '</li>\n';
|
||||
}
|
||||
body = body.replace(/^\s+/, '').replace(/^(<p[^>]*>)\s+/i, '$1');
|
||||
text = text.replace(/^\s+/, '').replace(/^(<p[^>]*>)\s+/i, '$1');
|
||||
return '<li class="todo-list-item"><span class="cp-task-marker" aria-hidden="true">' + icon +
|
||||
'</span><div class="cp-task-body">' + body + '</div></li>\n';
|
||||
'</span><div class="cp-task-body">' + text + '</div></li>\n';
|
||||
};
|
||||
|
||||
var DISPLAYNAME_ID = "cp-app-profile-displayname";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user