Skip to content

Commit

Permalink
Add note about unsupported elements
Browse files Browse the repository at this point in the history
  • Loading branch information
satabin committed Mar 17, 2024
1 parent bf9bdc2 commit da3cd3e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions xml/src/main/scala/fs2/data/xml/XmlEvent.scala
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,19 @@ object XmlEvent {
DocEvent.GroupBegin :: DocEvent.Text(show"<$name ") :: DocEvent.AlignBegin :: Nil) ++ Stream
.emits(as)
.map(a => DocEvent.Text(a.show))
.intersperse(DocEvent.Line) ++ Stream.emits(DocEvent.AlignEnd :: DocEvent.Text(if (isEmpty) " />"
else ">") :: DocEvent.GroupEnd :: (if (isEmpty) Nil
else DocEvent.IndentBegin :: DocEvent.GroupBegin :: Nil))
.intersperse(DocEvent.Line) ++ Stream.emits(
DocEvent.AlignEnd :: DocEvent.Text(if (isEmpty) " />"
else ">") :: DocEvent.GroupEnd :: (if (isEmpty) Nil
else DocEvent.IndentBegin :: DocEvent.GroupBegin :: Nil))
case XmlString(s, false) =>
prefix(TEXT) ++ words(s)
case texty: XmlTexty =>
prefix(TEXT) ++ Stream.emit(DocEvent.Text(texty.render))
case XmlPI(target, content) =>
case XmlPI(_, _) =>
// TODO: add support for proper PI parsing so that we can render it properly
Stream.empty
case XmlDoctype(name, docname, systemid) =>
case XmlDoctype(_, _, _) =>
// TODO: add support for proper Doctype parsing so that we can render it properly
Stream.empty
case EndTag(name) =>
val res =
Expand Down

0 comments on commit da3cd3e

Please sign in to comment.