Commit 3afebf2
fix(generators): normalize trailing newline in Turtle serialization
rdflib's Turtle serializer always emits a trailing double newline.
Normalize to single newline in deterministic_turtle() and the rdflib
fallback path in canonicalize_rdf_graph() for consistent file endings.
Note: CLI print() still adds a newline after serialize()'s trailing
newline. Callers capturing stdout should strip trailing blank lines
(e.g. via sed).
Signed-off-by: Carlo van Driesten <carlo.van-driesten@bmw.de>1 parent 0c87aba commit 3afebf2
3 files changed
Lines changed: 9 additions & 4 deletions
File tree
- packages/linkml/src/linkml
- generators
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
| 240 | + | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| |||
0 commit comments