Only style ordered list with dl.message-properties

This commit is contained in:
Steve-Mcl 2021-10-04 23:36:22 +01:00
parent c0a256306b
commit aa1721ab3d
1 changed files with 5 additions and 6 deletions

View File

@ -84,15 +84,14 @@ RED.utils = (function() {
//override list creation - add node-ports to order lists
renderer.list = function (body, ordered, start) {
let temp = body;
if (enable && ordered) {
temp = `<ol class="node-ports">${body}</ol>`;
let addClass = /dl.*?class.*?message-properties.*/.test(body);
if (addClass && ordered) {
return '<ol class="node-ports">' + body + '</ol>';
} else if (ordered) {
temp = `<ol>${body}</ol>`;
return '<ol>' + body + '</ol>';
} else {
temp = `<ul>${body}</ul>`;
return '<ul>' + body + '</ul>'
}
return temp;
}
window._marked.setOptions({