Skip to content

Commit

Permalink
🎨 改进 Markdown 渲染
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 17, 2020
1 parent 358e7a1 commit 73ffffa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/org/b3log/solo/util/Markdowns.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
* </p>
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.3.1.10, Sep 23, 2019
* @version 2.3.1.11, Jan 17, 2020
* @since 0.4.5
*/
public final class Markdowns {
Expand Down Expand Up @@ -166,10 +166,6 @@ public static String toHTML(final String markdownText) {
html = toHtmlByFlexmark(markdownText);
}

if (!StringUtils.startsWith(html, "<p>")) {
html = "<p>" + html + "</p>";
}

final Document doc = Jsoup.parse(html);
doc.select("a").forEach(a -> {
final String src = a.attr("href");
Expand Down

0 comments on commit 73ffffa

Please sign in to comment.