Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
fef6f4b9
Unverified
Commit
fef6f4b9
authored
Dec 30, 2018
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
⬆
升级 flexmark
parent
3c60549b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/main/java/org/b3log/solo/util/Markdowns.java
src/main/java/org/b3log/solo/util/Markdowns.java
+3
-3
No files found.
src/main/java/org/b3log/solo/util/Markdowns.java
View file @
fef6f4b9
...
@@ -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>"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment