forked from platypush/platypush
[Chore] Upgraded hljs.highlight
API.
The old API, (lang, code, ...args), is now deprecated.
This commit is contained in:
parent
b916c98b70
commit
5972c728a4
4 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
},
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
},
|
||||
|
||||
|
|
|
@ -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'}
|
||||
)
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue