on master help sign in
fix dislay of relation-valued attributes in HTML export
cf55b30AgentM
src/lib/ProjectM36/Relation/Show/HTML.hs+3−1
@@ -30,7 +30,9 @@ writeRel = writeHTML . relationAsHTML
30tupleAsHTML :: RelationTuple -> Text
30tupleAsHTML :: RelationTuple -> Text
31tupleAsHTML tuple = "<tr>" `append` T.concat (L.map tupleFrag (tupleAssocs tuple)) `append` "</tr>"
31tupleAsHTML tuple = "<tr>" `append` T.concat (L.map tupleFrag (tupleAssocs tuple)) `append` "</tr>"
32 where
32 where
33− tupleFrag tup = "<td>" `append` atomToText (snd tup) `append` "</td>"
33+ tupleFrag tup = "<td>" `append` atomAsHTML (snd tup) `append` "</td>"
34+ atomAsHTML (RelationAtom rel) = relationAsHTML rel
35+ atomAsHTML atom = atomToText atom
34
36
35tupleSetAsHTML :: RelationTupleSet -> Text
37tupleSetAsHTML :: RelationTupleSet -> Text
36tupleSetAsHTML tupSet = foldr folder "" (asList tupSet)
38tupleSetAsHTML tupSet = foldr folder "" (asList tupSet)