Fix markdown headers sometimes not rendering in About (#592)

Fix markdown headers sometimes not rendering in subreddit About section
This commit is contained in:
scria1000 2021-12-15 13:46:04 +00:00 committed by GitHub
parent e90a3b674e
commit f3b0a04f3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import ml.docilealligator.infinityforreddit.subreddit.SubredditData;
import ml.docilealligator.infinityforreddit.subscribedsubreddit.SubscribedSubredditData; import ml.docilealligator.infinityforreddit.subscribedsubreddit.SubscribedSubredditData;
import ml.docilealligator.infinityforreddit.subscribeduser.SubscribedUserData; import ml.docilealligator.infinityforreddit.subscribeduser.SubscribedUserData;
import ml.docilealligator.infinityforreddit.utils.JSONUtils; import ml.docilealligator.infinityforreddit.utils.JSONUtils;
import ml.docilealligator.infinityforreddit.utils.Utils;
class ParseSubscribedThing { class ParseSubscribedThing {
static void parseSubscribedSubreddits(String response, String accountName, static void parseSubscribedSubreddits(String response, String accountName,
@ -97,7 +98,7 @@ class ParseSubscribedThing {
} else { } else {
String subredditFullName = data.getString(JSONUtils.DISPLAY_NAME_KEY); String subredditFullName = data.getString(JSONUtils.DISPLAY_NAME_KEY);
String description = data.getString(JSONUtils.PUBLIC_DESCRIPTION_KEY).trim(); String description = data.getString(JSONUtils.PUBLIC_DESCRIPTION_KEY).trim();
String sidebarDescription = data.getString(JSONUtils.DESCRIPTION_KEY); String sidebarDescription = Utils.modifyMarkdown(data.getString(JSONUtils.DESCRIPTION_KEY).trim());
int nSubscribers = data.getInt(JSONUtils.SUBSCRIBERS_KEY); int nSubscribers = data.getInt(JSONUtils.SUBSCRIBERS_KEY);
long createdUTC = data.getLong(JSONUtils.CREATED_UTC_KEY) * 1000; long createdUTC = data.getLong(JSONUtils.CREATED_UTC_KEY) * 1000;
String suggestedCommentSort = data.getString(JSONUtils.SUGGESTED_COMMENT_SORT_KEY); String suggestedCommentSort = data.getString(JSONUtils.SUGGESTED_COMMENT_SORT_KEY);