核心:读取文件
    参考文章https://blog.csdn.net/w3045872817/article/details/78429742

    这边稍微优化了下

    1. public String get()throws Exception{
    2. String html ="";
    3. FileReader fr = new FileReader("E:/test.md");
    4. BufferedReader br = new BufferedReader(fr);
    5. String str;
    6. while(null != (str=br.readLine())){
    7. str+="\n";
    8. html += str;
    9. }
    10. br.close();
    11. PegDownProcessor pdp = new PegDownProcessor(Integer.MAX_VALUE);
    12. html = pdp.markdownToHtml(html);
    13. return html;
    14. }