Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

SPARQL language not working #327

Open
Youssef-98 opened this issue Aug 26, 2021 · 5 comments
Open

SPARQL language not working #327

Youssef-98 opened this issue Aug 26, 2021 · 5 comments

Comments

@Youssef-98
Copy link

Youssef-98 commented Aug 26, 2021

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?

@RobbieTheWagner
Copy link
Member

@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
Copy link
Author

Youssef-98 commented Aug 26, 2021

@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

@RobbieTheWagner
Copy link
Member

@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
Copy link
Author

Youssef-98 commented Aug 26, 2021

@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.

@RobbieTheWagner
Copy link
Member

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants