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() {
|
highlightedCurlSnippet() {
|
||||||
return hljs.highlight(
|
return hljs.highlight(
|
||||||
'bash',
|
|
||||||
'# Note: Replace the cookie with a JWT token for production cases\n' +
|
'# Note: Replace the cookie with a JWT token for production cases\n' +
|
||||||
this.curlSnippet
|
this.curlSnippet,
|
||||||
|
{language: 'bash'}
|
||||||
).value
|
).value
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default {
|
||||||
|
|
||||||
jsonResponse() {
|
jsonResponse() {
|
||||||
if (this.isJSON) {
|
if (this.isJSON) {
|
||||||
return hljs.highlight('json', this.response).value
|
return hljs.highlight(this.response, {language: 'json'}).value
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|
|
@ -49,9 +49,9 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
highlightedConfigSnippet() {
|
highlightedConfigSnippet() {
|
||||||
return hljs.highlight(
|
return hljs.highlight(
|
||||||
'yaml',
|
|
||||||
`# Configuration template. You can add it to ${this.configFile}\n` +
|
`# Configuration template. You can add it to ${this.configFile}\n` +
|
||||||
this.extension.config_snippet,
|
this.extension.config_snippet,
|
||||||
|
{language: 'yaml'}
|
||||||
).value.trim()
|
).value.trim()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -88,13 +88,13 @@ export default {
|
||||||
return (
|
return (
|
||||||
this.installCmd ?
|
this.installCmd ?
|
||||||
hljs.highlight(
|
hljs.highlight(
|
||||||
'bash',
|
|
||||||
this.extension.deps.install_cmd
|
this.extension.deps.install_cmd
|
||||||
.map((cmd) => `$ ${cmd}`)
|
.map((cmd) => `$ ${cmd}`)
|
||||||
.join('\n')
|
.join('\n')
|
||||||
.trim()
|
.trim()
|
||||||
).value :
|
).value :
|
||||||
'# No extra installation steps required'
|
'# No extra installation steps required',
|
||||||
|
{language: 'bash'}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue