[Chore] Upgraded `hljs.highlight` API.

The old API, (lang, code, ...args), is now deprecated.
This commit is contained in:
Fabio Manganiello 2023-12-16 23:49:25 +01:00
parent b916c98b70
commit 5972c728a4
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
4 changed files with 6 additions and 6 deletions

View File

@ -269,9 +269,9 @@ export default {
highlightedCurlSnippet() {
return hljs.highlight(
'bash',
'# Note: Replace the cookie with a JWT token for production cases\n' +
this.curlSnippet
this.curlSnippet,
{language: 'bash'}
).value
},
},

View File

@ -46,7 +46,7 @@ export default {
jsonResponse() {
if (this.isJSON) {
return hljs.highlight('json', this.response).value
return hljs.highlight(this.response, {language: 'json'}).value
}
return null

View File

@ -49,9 +49,9 @@ export default {
computed: {
highlightedConfigSnippet() {
return hljs.highlight(
'yaml',
`# Configuration template. You can add it to ${this.configFile}\n` +
this.extension.config_snippet,
{language: 'yaml'}
).value.trim()
},

View File

@ -88,13 +88,13 @@ export default {
return (
this.installCmd ?
hljs.highlight(
'bash',
this.extension.deps.install_cmd
.map((cmd) => `$ ${cmd}`)
.join('\n')
.trim()
).value :
'# No extra installation steps required'
'# No extra installation steps required',
{language: 'bash'}
)
},
},