mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Website: Upgrade highlight.js dependency to improve syntax highlighting on documentation pages (#12370)
Closes: #12214 Changes: - Upgraded the version of highlight.js we're using from `v9.10.0` to `v10.7.3` to add support for YAML syntax highlighting. - Updated highlight.js usage (`hljs.highlightBlock()`» `hljs.highlightElement()`)
This commit is contained in:
parent
74af345f74
commit
d676118307
1361
website/assets/dependencies/highlight.min.js
vendored
1361
website/assets/dependencies/highlight.min.js
vendored
File diff suppressed because one or more lines are too long
@ -132,7 +132,7 @@ parasails.registerPage('basic-documentation', {
|
||||
// https://github.com/sailshq/sailsjs.com/blob/7a74d4901dcc1e63080b502492b03fc971d3d3b2/assets/js/functions/sails-website-actions.js#L177-L239
|
||||
(function highlightThatSyntax(){
|
||||
$('pre code').each((i, block) => {
|
||||
window.hljs.highlightBlock(block);
|
||||
window.hljs.highlightElement(block);
|
||||
});
|
||||
|
||||
// Make sure the <pre> tags whose code isn't being highlighted
|
||||
|
@ -88,7 +88,7 @@ parasails.registerPage('osquery-table-details', {
|
||||
}
|
||||
$(block).html(replacementHMTL);
|
||||
// After we've highlighted our keywords, we'll highlight the rest of the codeblock
|
||||
window.hljs.highlightBlock(block);
|
||||
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)=>{
|
||||
|
Loading…
Reference in New Issue
Block a user