Skip to content

Commit

Permalink
Correct links to ttl and rq, add language tag for comments in index page
Browse files Browse the repository at this point in the history
  • Loading branch information
JervenBolleman committed Oct 8, 2024
1 parent 4a2c8fa commit 9b7b839
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.stream.Stream;

import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Model;
import org.eclipse.rdf4j.model.Statement;
import org.eclipse.rdf4j.model.Value;
Expand Down Expand Up @@ -94,7 +95,11 @@ private static Function<Value, String> asNiceLink(String fileName, String extens
comment = comment.substring(0, 75)+"...";
}
String fileNameOfMdFile = fileName.substring(0, fileName.length() - 4) + extension;
return " - [" + comment + "](./" + fileNameOfMdFile + ")";
if(v instanceof Literal l && l.getLanguage().isPresent()) {
return " - [" + comment + "@" + l.getLanguage().get() + "](./" + fileNameOfMdFile + ")";
}else {
return " - [" + comment + "](./" + fileNameOfMdFile + ")";
}
};
}
}

0 comments on commit 9b7b839

Please sign in to comment.