add flexmark util to handle markdown
This commit is contained in:
parent
9418bf1e8b
commit
07e7a7aa6a
17
pom.xml
17
pom.xml
|
@ -32,6 +32,7 @@
|
|||
</developers>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<flexmark.version>0.50.40</flexmark.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -60,6 +61,22 @@
|
|||
<artifactId>common-util</artifactId>
|
||||
<version>1.8.5</version>
|
||||
</dependency>
|
||||
<!--markdown to html-->
|
||||
<dependency>
|
||||
<groupId>com.vladsch.flexmark</groupId>
|
||||
<artifactId>flexmark</artifactId>
|
||||
<version>${flexmark.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vladsch.flexmark</groupId>
|
||||
<artifactId>flexmark-util</artifactId>
|
||||
<version>${flexmark.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.vladsch.flexmark</groupId>
|
||||
<artifactId>flexmark-ext-tables</artifactId>
|
||||
<version>${flexmark.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.power.doc.util;
|
||||
|
||||
import com.power.common.util.FileUtil;
|
||||
import com.power.common.util.MD6Util;
|
||||
import com.power.doc.utils.MarkDownUtil;
|
||||
import org.apache.commons.codec.digest.Md5Crypt;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author yu 2019/9/21.
|
||||
*/
|
||||
public class MarkDownUtilTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void testToHtml() {
|
||||
System.out.println(Md5Crypt.md5Crypt("XssController".getBytes()));
|
||||
// String file = FileUtil.getFileContent("D:\\md\\XssControllerApi.md");
|
||||
// String html = MarkDownUtil.toHtml(file);
|
||||
// System.out.println(html);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue