aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-11-14 15:52:51 +0000
committerDavid Robillard <d@drobilla.net>2012-11-14 15:52:51 +0000
commit1460a4b83fb70b728906a24f49da4f1745a10776 (patch)
treea49bdf7de805177719fd17a9113efd83f0ab2999
parent648e940950c321fda75e20d410b3bfdb2c1baee4 (diff)
downloadserd-1460a4b83fb70b728906a24f49da4f1745a10776.tar.gz
serd-1460a4b83fb70b728906a24f49da4f1745a10776.tar.bz2
serd-1460a4b83fb70b728906a24f49da4f1745a10776.zip
Fix bug that caused "a" abbreviation in non-predicate position (#862).
git-svn-id: http://svn.drobilla.net/serd/trunk@399 490d8e77-9747-427b-9fa3-0b8f29cee8a0
-rw-r--r--NEWS3
-rw-r--r--src/writer.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 394252ad..e05c420f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
serd (0.18.1) unstable;
+ * Fix bug that caused "a" abbreviation in non-predicate position
* Disable timestamps in HTML documentation for reproducible build
* Fix clashing symbol "error" in amalgamation build
- -- David Robillard <d@drobilla.net> Sun, 09 Sep 2012 03:38:08 -0400
+ -- David Robillard <d@drobilla.net> Wed, 14 Nov 2012 10:48:57 -0500
serd (0.18.0) stable;
diff --git a/src/writer.c b/src/writer.c
index 86fe482a..c6f010c0 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -408,7 +408,7 @@ write_node(SerdWriter* writer,
break;
case SERD_URI:
has_scheme = serd_uri_string_has_scheme(node->buf);
- if ((writer->syntax == SERD_TURTLE)
+ if (field == FIELD_PREDICATE && (writer->syntax == SERD_TURTLE)
&& !strcmp((const char*)node->buf, NS_RDF "type")) {
sink("a", 1, writer);
break;