Skip to content

Commit

Permalink
core: exporters: owl2: preserve newlines in exported literals
Browse files Browse the repository at this point in the history
Avoid removing newlines from literal values and export them as
entered by the user. This removal was mostly a hack from the time
when entity IRIs where entered with newlines in them for formatting
purposes, and automatically-generated annotations like rdfs:label
where also getting these newlines.
  • Loading branch information
mnamici committed Dec 17, 2022
1 parent 538db54 commit 4bf7790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eddy/core/exporters/owl2.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def getOWLApiAnnotation(self, annotation):
if annotation.isIRIValued():
value = self.IRI.create(str(annotation.value))
else:
lexicalForm = annotation.value.replace('\n', ' ')
lexicalForm = annotation.value
if annotation.language:
value = self.df.getOWLLiteral(lexicalForm, annotation.language)
else:
Expand Down

0 comments on commit 4bf7790

Please sign in to comment.