1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Tools: Implement "prefer-object-spread" eslint rule

This commit is contained in:
Laurent Cozic
2023-06-01 12:02:36 +01:00
parent 804d674d37
commit c89edd7b22
126 changed files with 588 additions and 909 deletions

View File

@@ -161,11 +161,9 @@ class HtmlUtils {
}
public sanitizeHtml(html: string, options: SanitizeHtmlOptions = null) {
options = Object.assign({}, {
// If true, adds a "jop-noMdConv" class to all the tags.
options = { // If true, adds a "jop-noMdConv" class to all the tags.
// It can be used afterwards to restore HTML tags in Markdown.
addNoMdConvClass: false,
}, options);
addNoMdConvClass: false, ...options };
const output: string[] = [];
@@ -216,7 +214,7 @@ class HtmlUtils {
if (disallowedTagDepth) return;
attrs = Object.assign({}, attrs);
attrs = { ...attrs };
// Remove all the attributes that start with "on", which
// normally should be JavaScript events. A better solution