1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

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

View File

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