ember-prism
ember-prism copied to clipboard
SPARQL language not working
I'm trying to show some queries in sparql but it seems that it doesn't work. My code is:
<CodeBlock
@language="sparql,rq"
@code="
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX schema: <http://schema.org/>
SELECT ?book ?bookTitle {
GRAPH <http://mu.semte.ch/application> {
?book a schema:Book.
?book schema:title ?bookTitle.
}
}"
/>
But it just gives an empty box with nothing, except when I remove the language attribute, then it works, but then there's no highlight on the code. Any reason as to why this happens?
@Youssef-98 I think you'll have to install those extra languages with prism. I don't know if they are included by default?
@Youssef-98 I think you'll have to install those extra languages with prism. I don't know if they are included by default?
I don't think you can install those languages seperately (not that I see in the documentation). It just says that the @language should include languages that are listed as supported languages in following link: https://prismjs.com/#supported-languages
@Youssef-98 sorry, what I mean is adding it to the config.
'ember-prism': {
'components': ['sparql'],
}
All languages are not auto added, you have to configure which ones you want, I think.
@Youssef-98 sorry, what I mean is adding it to the config.
'ember-prism': { 'components': ['sparql'], }All languages are not auto added, you have to configure which ones you want, I think.
I tried that as well. I tried it with rq and sql and all of them break the app.
@Youssef-98 you'll want to use:
'ember-prism': {
'components': ['sparql'],
}
If you have a reproduction using that config and using sparql in your templates, please send it over, but it should work if configured correctly.