Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extractor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
implementation project(':timeago-parser')

implementation "com.github.TeamNewPipe:nanojson:$nanojsonVersion"
implementation 'org.jsoup:jsoup:1.17.2'
implementation 'org.jsoup:jsoup:1.18.3'
implementation "com.google.code.findbugs:jsr305:$jsr305Version"

implementation 'org.mozilla:rhino:1.7.15'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.function.Function;
import java.util.stream.Collectors;

public class YoutubeDescriptionHelperTest {
class YoutubeDescriptionHelperTest {

private static void assertRunsToHtml(final String expectedHtml,
final List<Run> openers,
Expand All @@ -32,17 +32,17 @@ private static void assertRunsToHtml(final String expectedHtml,
}

@Test
public void testNoRuns() {
void testNoRuns() {
assertRunsToHtml(
"abc *a* _c_ &lt;br&gt; <br> &lt;a href=\"#\"&gt;test&lt;/a&gt; &nbsp;&amp;amp;",
"abc *a* _c_ &lt;br&gt; <br> &lt;a href=&quot;#&quot;&gt;test&lt;/a&gt; &nbsp;&amp;amp;",
List.of(),
List.of(),
"abc *a* _c_ <br>\u00a0\n\u00a0<a href=\"#\">test</a> &amp;"
);
}

@Test
public void testNormalRuns() {
void testNormalRuns() {
assertRunsToHtml(
"<A>hel<B>lo </B>nic</A>e <C>test</C>",
List.of(new Run("<A>", "</A>", 0), new Run("<B>", "</B>", 3),
Expand All @@ -54,7 +54,7 @@ public void testNormalRuns() {
}

@Test
public void testOverlappingRuns() {
void testOverlappingRuns() {
assertRunsToHtml(
"01<A>23<B>45</B></A><B>67</B>89",
List.of(new Run("<A>", "</A>", 2), new Run("<B>", "</B>", 4)),
Expand All @@ -64,7 +64,7 @@ public void testOverlappingRuns() {
}

@Test
public void testTransformingRuns() {
void testTransformingRuns() {
final Function<String, String> tA = content -> "whatever";
final Function<String, String> tD
= content -> Integer.parseInt(content) % 2 == 0 ? "even" : "odd";
Expand Down