From e3c5df8ec369047d73a54ed94caebe0a4f26627c Mon Sep 17 00:00:00 2001 From: Philippus Baalman Date: Wed, 22 Feb 2017 21:34:35 +0100 Subject: added missing Inline matches to inlineToStr so it is now exhaustive scala.xml.XML.loadString(tag).text will remove all html tags inside the HtmlTag use a regex to remove html tags inside the tag added some tests for the inlineToStr-method moved inlineToStr to companion object of Page added test for nested html tags --- test/scaladoc/run/inlineToStr-strips-unwanted-text.check | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/scaladoc/run/inlineToStr-strips-unwanted-text.check (limited to 'test/scaladoc/run/inlineToStr-strips-unwanted-text.check') diff --git a/test/scaladoc/run/inlineToStr-strips-unwanted-text.check b/test/scaladoc/run/inlineToStr-strips-unwanted-text.check new file mode 100644 index 0000000000..986b58d469 --- /dev/null +++ b/test/scaladoc/run/inlineToStr-strips-unwanted-text.check @@ -0,0 +1,13 @@ +Chain(List(Chain(List(Text(This comment contains ), Superscript(Text(superscript)))))) +Chain(List(Chain(List(Text(This comment contains ), Subscript(Text(subscript)))))) +Chain(List(Chain(List(Text(This comment contains a link ), Link(https://scala.epfl.ch/,Text(https://scala.epfl.ch/)))))) +Chain(List(Chain(List(Text(This comment contains an ), HtmlTag(html tag))))) +Chain(List(Chain(List(Text(This comment contains a), HtmlTag(
), Text( single html tag))))) +Chain(List(Chain(List(Text(This comment contains nested ), HtmlTag(html
tags
))))) +This comment contains superscript +This comment contains subscript +This comment contains a link https://scala.epfl.ch/ +This comment contains an html tag +This comment contains a single html tag +This comment contains nested html tags +Done. -- cgit v1.2.3