eyereasoner / eye

Euler Yet another proof Engine
https://eyereasoner.github.io/eye/
MIT License
125 stars 17 forks source link

Invalid triple output when multiline literal ends with quotation #80

Closed tpluscode closed 1 year ago

tpluscode commented 1 year ago

We stumbled upon a very specific edge case. We have a literal with includes line breaks and happens to end with a quote.

Here's an example: https://n3-editor.herokuapp.com/n3/editor/s/vVYPOPID

The way the literal ends with """" is not correct. It would need to be escaped as \""""

josd commented 1 year ago

It is now fixed and

@prefix crm: <http://www.cidoc-crm.org/cidoc-crm/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix : <http://example.com/> .

<http://example.com/object/14563> :Description "Fideris aus Westen, Gesamtansicht, rechts Galluskirche, \"Dorf Fideris\" sowie\r\naus Norden, Blick in die Schlucht, Kurhaus mit Nebengebäude, im Vordergrund Steinbrücke über den Arieschbach, \"Bad Fideris (Bündten)\"" .

{
  ?object :Description ?description .
}
=>
{
  ?object crm:P67i_is_referred_to_by [ a crm:E33_Linguistic_Object ;
    crm:P190_has_symbolic_content ?description ]
} .

should now give

@prefix crm: <http://www.cidoc-crm.org/cidoc-crm/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix : <http://example.com/>.

<http://example.com/object/14563> crm:P67i_is_referred_to_by _:sk_0.
_:sk_0 a crm:E33_Linguistic_Object.
_:sk_0 crm:P190_has_symbolic_content "Fideris aus Westen, Gesamtansicht, rechts Galluskirche, \"Dorf Fideris\" sowie\r\naus Norden, Blick in die Schlucht, Kurhaus mit Nebengebäude, im Vordergrund Steinbrücke über den Arieschbach, \"Bad Fideris (Bündten)\"".
tpluscode commented 1 year ago

Thank you for such a quick fix!