afford redundant whitespace for improved readability;
authorwenzelm
Tue, 05 Mar 2019 11:52:20 +0100
changeset 69862 db622ada496d
parent 69860 b58a575d211e
child 69863 9532d5b2e932
afford redundant whitespace for improved readability;
src/Pure/General/rdf.scala
--- a/src/Pure/General/rdf.scala	Sun Mar 03 20:27:42 2019 +0100
+++ b/src/Pure/General/rdf.scala	Tue Mar 05 11:52:20 2019 +0100
@@ -38,7 +38,11 @@
 
   def triples(args: List[Triple]): XML.Body =
     args.groupBy(_.subject).toList.map(
-      { case (subject, ts) => description(subject, ts.map(_.property)) })
+      { case (subject, ts) =>
+          val nl = XML.Text("\n")
+          val body = nl :: ts.flatMap(t => List(t.property, nl))
+          description(subject, body)
+      })
 
   def description(subject: String, body: XML.Body, attributes: XML.Attributes = Nil): XML.Elem =
     XML.Elem(Markup(rdf("Description"), (rdf("about"), subject) :: attributes), body)