diff --git a/cli/src/main.rs b/cli/src/main.rs
index b0f7a6fa..9e9a0dbd 100644
--- a/cli/src/main.rs
+++ b/cli/src/main.rs
@@ -2354,7 +2354,7 @@ mod tests {
.build();
ServerTest::new()?.test_body(
request,
- "{\"head\":{\"vars\":[\"s\",\"p\",\"o\"]},\"results\":{\"bindings\":[]}}",
+ r#"{"head":{"vars":["s","p","o"]},"results":{"bindings":[]}}"#,
)
}
@@ -2369,7 +2369,7 @@ mod tests {
.build();
ServerTest::new()?.test_body(
request,
- "{\"head\":{\"vars\":[\"s\",\"p\",\"o\"]},\"results\":{\"bindings\":[]}}",
+ r#"{"head":{"vars":["s","p","o"]},"results":{"bindings":[]}}"#,
)
}
@@ -2387,7 +2387,7 @@ mod tests {
.build();
ServerTest::new()?.test_body(
request,
- "{\"head\":{\"vars\":[\"s\",\"p\",\"o\"]},\"results\":{\"bindings\":[]}}",
+ r#"{"head":{"vars":["s","p","o"]},"results":{"bindings":[]}}"#,
)
}
@@ -2414,7 +2414,7 @@ mod tests {
.build();
ServerTest::new()?.test_body(
request,
- "{\"head\":{\"vars\":[\"s\",\"p\",\"o\"]},\"results\":{\"bindings\":[]}}",
+ r#"{"head":{"vars":["s","p","o"]},"results":{"bindings":[]}}"#,
)
}
@@ -2429,7 +2429,7 @@ mod tests {
.build();
ServerTest::new()?.test_body(
request,
- "{\"head\":{\"vars\":[\"s\",\"p\",\"o\"]},\"results\":{\"bindings\":[]}}",
+ r#"{"head":{"vars":["s","p","o"]},"results":{"bindings":[]}}"#,
)
}
#[test]
@@ -2679,16 +2679,16 @@ mod tests {
let request = Request::builder(Method::PUT, "http://localhost/store/person/1.ttl".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body(
- "
+ r#"
@prefix foaf: .
@prefix v: .
a foaf:Person;
foaf:businessCard [
a v:VCard;
- v:fn \"John Doe\"
+ v:fn "John Doe"
].
-",
+"#,
);
server.test_status(request, Status::CREATED)?;
@@ -2717,16 +2717,16 @@ mod tests {
let request = Request::builder(Method::PUT, "http://localhost/store/person/1.ttl".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body(
- "
+ r#"
@prefix foaf: .
@prefix v: .
a foaf:Person;
foaf:businessCard [
a v:VCard;
- v:fn \"Jane Doe\"
+ v:fn "Jane Doe"
].
-",
+"#,
);
server.test_status(request, Status::NO_CONTENT)?;
@@ -2740,16 +2740,16 @@ mod tests {
let request = Request::builder(Method::PUT, "http://localhost/store?default".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body(
- "
+ r#"
@prefix foaf: .
@prefix v: .
[] a foaf:Person;
foaf:businessCard [
a v:VCard;
- v:given-name \"Alice\"
+ v:given-name "Alice"
] .
-",
+"#,
);
server.test_status(request, Status::NO_CONTENT)?; // The default graph always exists in Oxigraph
@@ -2781,16 +2781,16 @@ mod tests {
let request = Request::builder(Method::PUT, "http://localhost/store/person/2.ttl".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body(
- "
+ r#"
@prefix foaf: .
@prefix v: .
[] a foaf:Person;
foaf:businessCard [
a v:VCard;
- v:given-name \"Alice\"
+ v:given-name "Alice"
] .
-",
+"#,
);
server.test_status(request, Status::NO_CONTENT)?;
@@ -2839,16 +2839,16 @@ mod tests {
let request = Request::builder(Method::POST, "http://localhost/store".parse()?)
.with_header(HeaderName::CONTENT_TYPE, "text/turtle; charset=utf-8")?
.with_body(
- "
+ r#"
@prefix foaf: .
@prefix v: .
[] a foaf:Person;
foaf:businessCard [
a v:VCard;
- v:given-name \"Alice\"
+ v:given-name "Alice"
] .
-",
+"#,
);
let response = server.exec(request);
assert_eq!(response.status(), Status::CREATED);
diff --git a/lib/oxrdf/src/literal.rs b/lib/oxrdf/src/literal.rs
index 976b863d..3f2727ca 100644
--- a/lib/oxrdf/src/literal.rs
+++ b/lib/oxrdf/src/literal.rs
@@ -24,12 +24,12 @@ use std::option::Option;
/// );
///
/// assert_eq!(
-/// "\"1999-01-01\"^^",
+/// r#""1999-01-01"^^"#,
/// Literal::new_typed_literal("1999-01-01", xsd::DATE).to_string()
/// );
///
/// assert_eq!(
-/// "\"foo\"@en",
+/// r#""foo"@en"#,
/// Literal::new_language_tagged_literal("foo", "en")?.to_string()
/// );
/// # Result::<(), LanguageTagParseError>::Ok(())
@@ -436,7 +436,7 @@ impl From for Literal {
/// );
///
/// assert_eq!(
-/// "\"1999-01-01\"^^",
+/// r#""1999-01-01"^^"#,
/// LiteralRef::new_typed_literal("1999-01-01", xsd::DATE).to_string()
/// );
/// ```
diff --git a/lib/oxrdfxml/README.md b/lib/oxrdfxml/README.md
index 8575d19b..29ebb4cf 100644
--- a/lib/oxrdfxml/README.md
+++ b/lib/oxrdfxml/README.md
@@ -12,31 +12,33 @@ OxRdfXml is a parser and serializer for [RDF/XML](https://www.w3.org/TR/rdf-synt
The entry points of this library are the two [`RdfXmlParser`] and [`RdfXmlSerializer`] structs.
Usage example counting the number of people in a RDF/XML file:
+
```rust
use oxrdf::{NamedNodeRef, vocab::rdf};
use oxrdfxml::RdfXmlParser;
-let file = b"
-
-
-
+fn main() {
+ let file = br#"
+
+
+
Foo
-
-";
-
-let schema_person = NamedNodeRef::new("http://schema.org/Person").unwrap();
-let mut count = 0;
-for triple in RdfXmlParser::new().parse_read(file.as_ref()) {
- let triple = triple.unwrap();
- if triple.predicate == rdf::TYPE && triple.object == schema_person.into() {
- count += 1;
+
+"#;
+
+ let schema_person = NamedNodeRef::new("http://schema.org/Person").unwrap();
+ let mut count = 0;
+ for triple in RdfXmlParser::new().parse_read(file.as_ref()) {
+ let triple = triple.unwrap();
+ if triple.predicate == rdf::TYPE && triple.object == schema_person.into() {
+ count += 1;
+ }
}
+ assert_eq!(2, count);
}
-assert_eq!(2, count);
```
-
## License
This project is licensed under either of
diff --git a/lib/oxrdfxml/src/parser.rs b/lib/oxrdfxml/src/parser.rs
index ba0b27a1..5a364c78 100644
--- a/lib/oxrdfxml/src/parser.rs
+++ b/lib/oxrdfxml/src/parser.rs
@@ -29,14 +29,14 @@ use tokio::io::{AsyncRead, BufReader as AsyncBufReader};
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxrdfxml::RdfXmlParser;
///
-/// let file = b"
-///
-///
-///
+/// let file = br#"
+///
+///
+///
/// Foo
///
-///
-/// ";
+///
+/// "#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -87,14 +87,14 @@ impl RdfXmlParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxrdfxml::RdfXmlParser;
///
- /// let file = b"
- ///
- ///
- ///
+ /// let file = br#"
+ ///
+ ///
+ ///
/// Foo
///
- ///
- /// ";
+ ///
+ /// "#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -124,14 +124,14 @@ impl RdfXmlParser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxrdfxml::ParseError> {
- /// let file = b"
- ///
- ///
- ///
+ /// let file = br#"
+ ///
+ ///
+ ///
/// Foo
///
- ///
- /// ";
+ ///
+ /// "#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -182,14 +182,14 @@ impl RdfXmlParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxrdfxml::RdfXmlParser;
///
-/// let file = b"
-///
-///
-///
+/// let file = br#"
+///
+///
+///
/// Foo
///
-///
-/// ";
+///
+/// "#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -251,14 +251,14 @@ impl FromReadRdfXmlReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxrdfxml::ParseError> {
-/// let file = b"
-///
-///
-///
+/// let file = br#"
+///
+///
+///
/// Foo
///
-///
-/// ";
+///
+/// "#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
diff --git a/lib/oxttl/src/n3.rs b/lib/oxttl/src/n3.rs
index 0642d416..eb1ce55d 100644
--- a/lib/oxttl/src/n3.rs
+++ b/lib/oxttl/src/n3.rs
@@ -184,12 +184,12 @@ impl From for N3Quad {
/// use oxrdf::{NamedNode, vocab::rdf};
/// use oxttl::n3::{N3Parser, N3Term};
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let rdf_type = N3Term::NamedNode(rdf::TYPE.into_owned());
/// let schema_person = N3Term::NamedNode(NamedNode::new("http://schema.org/Person")?);
@@ -253,12 +253,12 @@ impl N3Parser {
/// use oxrdf::NamedNode;
/// use oxttl::n3::{N3Parser, N3Term};
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let rdf_type = N3Term::NamedNode(NamedNode::new("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")?);
/// let schema_person = N3Term::NamedNode(NamedNode::new("http://schema.org/Person")?);
@@ -287,12 +287,12 @@ impl N3Parser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let rdf_type = N3Term::NamedNode(rdf::TYPE.into_owned());
/// let schema_person = N3Term::NamedNode(NamedNode::new_unchecked("http://schema.org/Person"));
@@ -369,12 +369,12 @@ impl N3Parser {
/// use oxrdf::{NamedNode, vocab::rdf};
/// use oxttl::n3::{N3Parser, N3Term};
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let rdf_type = N3Term::NamedNode(rdf::TYPE.into_owned());
/// let schema_person = N3Term::NamedNode(NamedNode::new("http://schema.org/Person")?);
@@ -403,10 +403,10 @@ impl FromReadN3Reader {
/// ```
/// use oxttl::N3Parser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse_read(file.as_ref());
/// assert!(reader.prefixes().is_empty()); // No prefix at the beginning
@@ -424,10 +424,10 @@ impl FromReadN3Reader {
/// ```
/// use oxttl::N3Parser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse_read(file.as_ref());
/// assert!(reader.base_iri().is_none()); // No base at the beginning because none has been given to the parser.
@@ -464,12 +464,12 @@ impl Iterator for FromReadN3Reader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let rdf_type = N3Term::NamedNode(rdf::TYPE.into_owned());
/// let schema_person = N3Term::NamedNode(NamedNode::new_unchecked("http://schema.org/Person"));
@@ -509,10 +509,10 @@ impl FromTokioAsyncReadN3Reader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse_tokio_async_read(file.as_ref());
/// assert!(reader.prefixes().is_empty()); // No prefix at the beginning
@@ -533,10 +533,10 @@ impl FromTokioAsyncReadN3Reader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse_tokio_async_read(file.as_ref());
/// assert!(reader.base_iri().is_none()); // No base IRI at the beginning
@@ -633,10 +633,10 @@ impl LowLevelN3Reader {
/// ```
/// use oxttl::N3Parser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse();
/// reader.extend_from_slice(file);
@@ -655,10 +655,10 @@ impl LowLevelN3Reader {
/// ```
/// use oxttl::N3Parser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = N3Parser::new().parse();
/// reader.extend_from_slice(file);
diff --git a/lib/oxttl/src/nquads.rs b/lib/oxttl/src/nquads.rs
index 9be1843b..d93c7293 100644
--- a/lib/oxttl/src/nquads.rs
+++ b/lib/oxttl/src/nquads.rs
@@ -19,10 +19,10 @@ use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NQuadsParser;
///
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -76,10 +76,10 @@ impl NQuadsParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NQuadsParser;
///
- /// let file = b" .
- /// \"Foo\" .
+ /// let file = br#" .
+ /// "Foo" .
/// .
- /// \"Bar\" .";
+ /// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -107,10 +107,10 @@ impl NQuadsParser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b" .
- /// \"Foo\" .
+ /// let file = br#" .
+ /// "Foo" .
/// .
- /// \"Bar\" .";
+ /// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -191,10 +191,10 @@ impl NQuadsParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NQuadsParser;
///
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -229,10 +229,10 @@ impl Iterator for FromReadNQuadsReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
diff --git a/lib/oxttl/src/ntriples.rs b/lib/oxttl/src/ntriples.rs
index 995643bc..c5ed5b94 100644
--- a/lib/oxttl/src/ntriples.rs
+++ b/lib/oxttl/src/ntriples.rs
@@ -19,10 +19,10 @@ use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NTriplesParser;
///
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -76,10 +76,10 @@ impl NTriplesParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NTriplesParser;
///
- /// let file = b" .
- /// \"Foo\" .
+ /// let file = br#" .
+ /// "Foo" .
/// .
- /// \"Bar\" .";
+ /// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -107,10 +107,10 @@ impl NTriplesParser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b" .
- /// \"Foo\" .
+ /// let file = br#" .
+ /// "Foo" .
/// .
- /// \"Bar\" .";
+ /// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -191,10 +191,10 @@ impl NTriplesParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::NTriplesParser;
///
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -229,10 +229,10 @@ impl Iterator for FromReadNTriplesReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
-/// let file = b" .
-/// \"Foo\" .
+/// let file = br#" .
+/// "Foo" .
/// .
-/// \"Bar\" .";
+/// "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -565,7 +565,7 @@ mod tests {
fn unchecked_parsing() {
let triples = NTriplesParser::new()
.unchecked()
- .parse_read(" \"baz\"@toolonglangtag .".as_bytes())
+ .parse_read(r#" "baz"@toolonglangtag ."#.as_bytes())
.collect::, _>>()
.unwrap();
assert_eq!(
diff --git a/lib/oxttl/src/trig.rs b/lib/oxttl/src/trig.rs
index 70d3edb6..08fbf271 100644
--- a/lib/oxttl/src/trig.rs
+++ b/lib/oxttl/src/trig.rs
@@ -22,12 +22,12 @@ use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt};
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TriGParser;
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -100,12 +100,12 @@ impl TriGParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TriGParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -133,12 +133,12 @@ impl TriGParser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -220,12 +220,12 @@ impl TriGParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TriGParser;
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -253,10 +253,10 @@ impl FromReadTriGReader {
/// ```
/// use oxttl::TriGParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse_read(file.as_ref());
/// assert!(reader.prefixes().is_empty()); // No prefix at the beginning
@@ -274,10 +274,10 @@ impl FromReadTriGReader {
/// ```
/// use oxttl::TriGParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse_read(file.as_ref());
/// assert!(reader.base_iri().is_none()); // No base at the beginning because none has been given to the parser.
@@ -314,12 +314,12 @@ impl Iterator for FromReadTriGReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -358,10 +358,10 @@ impl FromTokioAsyncReadTriGReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse_tokio_async_read(file.as_ref());
/// assert!(reader.prefixes().is_empty()); // No prefix at the beginning
@@ -382,10 +382,10 @@ impl FromTokioAsyncReadTriGReader {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse_tokio_async_read(file.as_ref());
/// assert!(reader.base_iri().is_none()); // No base IRI at the beginning
@@ -481,10 +481,10 @@ impl LowLevelTriGReader {
/// ```
/// use oxttl::TriGParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse();
/// reader.extend_from_slice(file);
@@ -503,10 +503,10 @@ impl LowLevelTriGReader {
/// ```
/// use oxttl::TriGParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .";
+ /// schema:name "Foo" ."#;
///
/// let mut reader = TriGParser::new().parse();
/// reader.extend_from_slice(file);
diff --git a/lib/oxttl/src/turtle.rs b/lib/oxttl/src/turtle.rs
index 0e225611..19590b94 100644
--- a/lib/oxttl/src/turtle.rs
+++ b/lib/oxttl/src/turtle.rs
@@ -24,12 +24,12 @@ use tokio::io::{AsyncRead, AsyncWrite};
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TurtleParser;
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -102,12 +102,12 @@ impl TurtleParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TurtleParser;
///
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -135,12 +135,12 @@ impl TurtleParser {
///
/// # #[tokio::main(flavor = "current_thread")]
/// # async fn main() -> Result<(), oxttl::ParseError> {
- /// let file = b"@base .
+ /// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
- /// schema:name \"Foo\" .
+ /// schema:name "Foo" .
/// a schema:Person ;
- /// schema:name \"Bar\" .";
+ /// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new_unchecked("http://schema.org/Person");
/// let mut count = 0;
@@ -222,12 +222,12 @@ impl TurtleParser {
/// use oxrdf::{NamedNodeRef, vocab::rdf};
/// use oxttl::TurtleParser;
///
-/// let file = b"@base .
+/// let file = br#"@base .
/// @prefix schema: .
/// a schema:Person ;
-/// schema:name \"Foo\" .
+/// schema:name "Foo" .
/// a schema:Person ;
-/// schema:name \"Bar\" .";
+/// schema:name "Bar" ."#;
///
/// let schema_person = NamedNodeRef::new("http://schema.org/Person")?;
/// let mut count = 0;
@@ -255,10 +255,10 @@ impl