Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each object on a new line (new formatting option suggestion) #29

Open
hoijui opened this issue Sep 15, 2024 · 3 comments
Open

Each object on a new line (new formatting option suggestion) #29

hoijui opened this issue Sep 15, 2024 · 3 comments

Comments

@hoijui
Copy link

hoijui commented Sep 15, 2024

This is only applicable when commas are used in case of multiple objects per subject-predicate pair.

It would look like this:

off (with the comma option on):

@prefix : <http://example.com/> .

:test
  :blorb "a", "b", "c" ;
  :floop "d" .

on:

@prefix : <http://example.com/> .

:test
  :blorb
    "a" ,
    "b" ,
    "c"
  :floop "d" .
  .

I prefer it this way to minimize diffs when adding/removing an object.

I am not fully happy with it, because unlike with the ;, the last object in the list can not be terminated with a , according to Turtle syntax, but I think it is still an improvement to do it this way.

Opinions?

@atextor
Copy link
Owner

atextor commented Sep 15, 2024

I like the idea as an option. But is is your second code block correct? I'd use this syntax:

@prefix : <http://example.com/> .

:test
  :blorb
    "a" ,
    "b" ,
    "c" ;
  :floop "d" .

(With a ; after "c", and either a ; after "d" or remove the last full stop)

@hoijui
Copy link
Author

hoijui commented Sep 15, 2024

:-)
... yes of course you are right; two errors I made.

Should I try to implement it or will you do it?

@atextor
Copy link
Owner

atextor commented Sep 16, 2024

Contributions are very welcome, so if you feel like it, please go ahead!
I'd address it eventually, but not immediately (try to focus on atextor/owl-cli#19 first to at some point be able to look at atextor/owl-cli#20).

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

No branches or pull requests

2 participants