This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* render a tweet using entities: for example | |
* val e = Entity(10, 21, """<a href="https://twitter.com/search/?q=%23ScalaIntro">#ScalaIntro</a>""") | |
* val entities = Seq(e) | |
* render("I love my #ScalaIntro exercises!", entities) | |
* should result in | |
* """I love my <a href="https://twitter.com/search/?q=%23ScalaIntro">#ScalaIntro</a> exercises!""" | |
* The "start" and "end" fields of an Entity refer to the indices in the | |
* original string to be substituted with the html field; you may assume | |
* that these indices are all non-overlapping. | |
*/ |