Skip to content

Commit

Permalink
Merge pull request #35 from ShareASmile/remove-var-usages
Browse files Browse the repository at this point in the history
Remove var usages
  • Loading branch information
ShareASmile authored Dec 10, 2023
2 parents 4aab1a3 + a969c03 commit 4e51053
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ public Description getCommentText() throws ParsingException {
final String htmlText = JsonUtils.getString(item, "text");
try {
final Document doc = Jsoup.parse(htmlText);
final var text = doc.body().text();
final String text = doc.body().text();
return new Description(text, Description.PLAIN_TEXT);
} catch (final Exception e) {
final var text = htmlText.replaceAll("(?s)<[^>]*>(\\s*<[^>]*>)*", "");
final String text = htmlText.replaceAll("(?s)<[^>]*>(\\s*<[^>]*>)*", "");
return new Description(text, Description.PLAIN_TEXT);
}
}
Expand Down

0 comments on commit 4e51053

Please sign in to comment.