mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Website: Update syntax highlighting on osquery schema pages (#25894)
Closes: #25893 Changes: - Updated the syntax highlighting on schema table pages to not try to match column names that are less than two characters long. (This only affects syntax highlighting on the `/tables/ioreg` page)
This commit is contained in:
parent
8d9ca0eabf
commit
4a8a054a8a
1 changed files with 5 additions and 0 deletions
|
|
@ -89,6 +89,11 @@ parasails.registerPage('osquery-table-details', {
|
|||
// $(block).html(replacementHMTL);
|
||||
let columnNamesToHighlight = [];// Empty array to track the keywords that we will need to highlight
|
||||
for(let keyword of keywordsForThisTable){// Going through the array of keywords for this table, if the entire word matches, we'll add it to the
|
||||
// Skip column names that are less than two characters long.
|
||||
// We do this because some tables (ioreg) have columns that have single characacter names, which can be inaccuratly matched.
|
||||
if(keyword.length < 2) {
|
||||
continue;
|
||||
}
|
||||
for(let match of block.innerHTML.match(keyword)||[]){
|
||||
columnNamesToHighlight.push(match);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue