Fix token counter chunk sanitation
This commit is contained in:
parent
0678777460
commit
b0fbe9434d
|
@ -101,7 +101,9 @@ function drawChunks(chunks, ids) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const color = pastelRainbow[i % pastelRainbow.length];
|
const color = pastelRainbow[i % pastelRainbow.length];
|
||||||
const chunkHtml = $(`<code style="background-color: ${color};">${chunk}</code>`);
|
const chunkHtml = $('<code></code>');
|
||||||
|
chunkHtml.css('background-color', color);
|
||||||
|
chunkHtml.text(chunk);
|
||||||
chunkHtml.attr('title', ids[i]);
|
chunkHtml.attr('title', ids[i]);
|
||||||
$('#tokenized_chunks_display').append(chunkHtml);
|
$('#tokenized_chunks_display').append(chunkHtml);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue