SPARQL.js
SPARQL.js copied to clipboard
Use semicolon separator for multiple statements with same subject
When formatting, I think it would be better to preserve semicolon, or even to always use it when possible. E.g. if two consequent statements have the same subject, use semicolon and indent the second statement. If statements have the same subject and predicate, use comma and put all objects on the same line. I think this makes SPARQL much more readable, and highlights the fact that the subject is the same.
Original:
SELECT * WHERE {
?osmid osmt:place "city";
osmt:wikidata ?wd.
}
Expected formatting:
SELECT * WHERE {
?osmid osmt:place "city";
osmt:wikidata ?wd.
}
Current result:
SELECT * WHERE {
?osmid osmt:place "city".
?osmid osmt:wikidata ?wd.
}
Another option would be preserving the syntax variant in the AST