Skip to content

Instantly share code, notes, and snippets.

@dcsobral
Created December 10, 2013 13:55
Show Gist options
  • Save dcsobral/7890914 to your computer and use it in GitHub Desktop.
Save dcsobral/7890914 to your computer and use it in GitHub Desktop.
JSoup demo
scala> Jsoup.parse("<B>bold, <I>bould italic, </b>italic, </i>normal text")
res0: org.jsoup.nodes.Document =
<html>
<head></head>
<body>
<b>bold, <i>bould italic, </i></b>
<i>italic, </i>normal text
</body>
</html>
@slandelle
Copy link

Lagarto doesn't go so far as to add html and body tags, and doesn't seem to take the same decisions about missing tags:

scala> new LagartoDOMBuilder().parse("<B>bold, <I>bould italic, </b>italic, </i>normal text").getHtml
res0: String = <b>bold, <i>bould italic, </i></b>italic, normal text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment