Commit fef6f4b9 authored by Liang Ding's avatar Liang Ding

升级 flexmark

parent 3c60549b
...@@ -51,7 +51,7 @@ import java.util.concurrent.*; ...@@ -51,7 +51,7 @@ import java.util.concurrent.*;
* </p> * </p>
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 2.3.1.2, Oct 14, 2018 * @version 2.3.1.3, Dec 30, 2018
* @since 0.4.5 * @since 0.4.5
*/ */
public final class Markdowns { public final class Markdowns {
...@@ -172,14 +172,14 @@ public final class Markdowns { ...@@ -172,14 +172,14 @@ public final class Markdowns {
} catch (final Exception e) { } catch (final Exception e) {
LOGGER.log(Level.WARN, "Failed to use [marked] for markdown [md=" + StringUtils.substring(markdownText, 0, 256) + "]: " + e.getMessage()); LOGGER.log(Level.WARN, "Failed to use [marked] for markdown [md=" + StringUtils.substring(markdownText, 0, 256) + "]: " + e.getMessage());
com.vladsch.flexmark.ast.Node document = PARSER.parse(markdownText); com.vladsch.flexmark.util.ast.Node document = PARSER.parse(markdownText);
html = RENDERER.render(document); html = RENDERER.render(document);
if (!StringUtils.startsWith(html, "<p>")) { if (!StringUtils.startsWith(html, "<p>")) {
html = "<p>" + html + "</p>"; html = "<p>" + html + "</p>";
} }
} }
} else { } else {
com.vladsch.flexmark.ast.Node document = PARSER.parse(markdownText); com.vladsch.flexmark.util.ast.Node document = PARSER.parse(markdownText);
html = RENDERER.render(document); html = RENDERER.render(document);
if (!StringUtils.startsWith(html, "<p>")) { if (!StringUtils.startsWith(html, "<p>")) {
html = "<p>" + html + "</p>"; html = "<p>" + html + "</p>";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment