diff options
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | tests/test-lang.out | 1 | ||||
-rw-r--r-- | tests/test-lang.ttl | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/reader.c b/src/reader.c index 114b53af..615f4d46 100644 --- a/src/reader.c +++ b/src/reader.c @@ -773,7 +773,7 @@ read_language(SerdReader reader) while ((c = peek_byte(reader)) && in_range(c, 'a', 'z')) { push_byte(reader, str, eat_byte(reader, c)); } - if (peek_byte(reader) == '-') { + while (peek_byte(reader) == '-') { push_byte(reader, str, eat_byte(reader, '-')); while ((c = peek_byte(reader)) && ( in_range(c, 'a', 'z') || in_range(c, '0', '9'))) { diff --git a/tests/test-lang.out b/tests/test-lang.out index a75749b0..c36dda42 100644 --- a/tests/test-lang.out +++ b/tests/test-lang.out @@ -1,3 +1,4 @@ <http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Hello"@en . <http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Howdy"@en-us . <http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Bonjour"@fr . +<http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Guten Tag"@de-latn-de . diff --git a/tests/test-lang.ttl b/tests/test-lang.ttl index a4a6c77f..f7c2727f 100644 --- a/tests/test-lang.ttl +++ b/tests/test-lang.ttl @@ -2,4 +2,5 @@ :thing :greeting "Hello"@en ; :greeting "Howdy"@en-us ; - :greeting "Bonjour"@fr . + :greeting "Bonjour"@fr ; + :greeting "Guten Tag"@de-latn-de . |