mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Website: update automatic formatting of osquery schema table examples (#19881)
Closes: #19750 Changes: - Updated osquery table schema pages to preserve whitespace and newlines in multi-line examples.
This commit is contained in:
parent
00a2e6bac2
commit
688d86afd3
2 changed files with 8 additions and 6 deletions
|
|
@ -90,11 +90,14 @@ parasails.registerPage('osquery-table-details', {
|
|||
$(block).html(replacementHMTL);
|
||||
// After we've highlighted our keywords, we'll highlight the rest of the codeblock
|
||||
window.hljs.highlightElement(block);
|
||||
});
|
||||
// Adding [purpose="line-break"] to SQL keywords if they are one of: SELECT, WHERE, FROM, JOIN. (case-insensitive)
|
||||
$('.hljs-keyword').each((i, el)=>{
|
||||
for(i in el.innerText.match(/select|where|from|join/gi)) {
|
||||
$(el).attr({'purpose':'line-break'});
|
||||
// If this example is a single-line, we'll do some basic formatting to make it more human-readable.
|
||||
if(!$(block)[0].innerText.match(/\n/gmi)){
|
||||
// Adding [purpose="line-break"] to SQL keywords if they are one of: SELECT, WHERE, FROM, JOIN. (case-insensitive)
|
||||
$('.hljs-keyword').each((i, el)=>{
|
||||
for(i in el.innerText.match(/select|where|from|join/gi)) {
|
||||
$(el).attr({'purpose':'line-break'});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -294,7 +294,6 @@
|
|||
background-color: @ui-off-white;
|
||||
border: none;
|
||||
word-break: break-word;
|
||||
white-space-collapse: collapse;
|
||||
text-wrap: wrap;
|
||||
padding: 0;
|
||||
font-size: 13px;
|
||||
|
|
|
|||
Loading…
Reference in a new issue