Skip to content

Commit

Permalink
fix: schema:keyword should be schema:keywords when exporting an example
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Oct 14, 2024
1 parent ba9d9f6 commit ed9664c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sparql-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export class SparqlEditor extends HTMLElement {
.map((kw: string) => `"${kw.trim()}"`)
.join(", ");
const queryType = capitalize(this.yasgui?.getTab()?.getYasqe().getQueryType() || "Select");
const keywordsBit = keywordsStr.length > 2 ? `schema:keyword ${keywordsStr} ;\n ` : "";
const keywordsBit = keywordsStr.length > 2 ? `schema:keywords ${keywordsStr} ;\n ` : "";
const exampleUri = (dialog.querySelector("#example-uri") as HTMLInputElement).value;
return [
`@prefix ex: <${this.examplesNamespace()}> .
Expand All @@ -510,10 +510,7 @@ export class SparqlEditor extends HTMLElement {
@prefix sh: <http://www.w3.org/ns/shacl#> .
ex:${exampleUri} a sh:SPARQLExecutable${
["Select", "Construct", "Ask"].includes(queryType)
? `,
sh:SPARQL${queryType}Executable`
: ""
["Select", "Construct", "Ask"].includes(queryType) ? `, sh:SPARQL${queryType}Executable` : ""
} ;
rdfs:comment "${description}"@en ;
sh:prefixes _:sparql_examples_prefixes ;
Expand Down

0 comments on commit ed9664c

Please sign in to comment.