add flexmark util to handle markdown

This commit is contained in:
oppofind 2019-09-21 22:49:32 +08:00
parent 9418bf1e8b
commit 07e7a7aa6a
2 changed files with 39 additions and 0 deletions

17
pom.xml
View File

@ -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>

View File

@ -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);
}
}