mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Sanitize content of "source with lines" box of sample web app.
This commit is contained in:
parent
0832793497
commit
89a7013fc2
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,10 @@
|
|||
var padding = lines.length.toString().replace(/\d/g, " ");
|
||||
numbered.innerHTML = lines
|
||||
.map(function mapNumberedLine(line, index) {
|
||||
line = line
|
||||
.replace(/&/g, "&")
|
||||
.replace(/</g, "<")
|
||||
.replace(/>/g, ">");
|
||||
index++;
|
||||
var paddedIndex = (padding + index).slice(-padding.length);
|
||||
return "<span id='l" + index + "'><em>" + paddedIndex + "</em>: " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue