Make simple Markdown parser

table of Contents

Thinking

1. The correspondence relationship markdown simple html syntax portion of

SUMMARY symbol tag
# <h1 of> </ h1 of>
## <H2> </ H2>
### <H3> </ H3>
(so)

*** (s * or -) division lines <hr>

* * Bold <B> </ B>
* italics * <i> </ i>

*** *** bold italics composition i, b tag

代码块 <pre></pre>

![alt](href)

img tag embedded p

[title](href)

tag embedded in a p

2. Read md local file
at the beginning and end of the code 3.html
4. Synthesis and export file html


process

js异常处理机制:https://blog.csdn.net/sdta25196/article/details/78841666
谷歌浏览器控制台:https://blog.csdn.net/weixin_43645287/article/details/87872109
  • Knowledge focus
    js elevation statement of the json

to sum up

  • For the first time (previously) tasted google browser debug function, simply flattered
  • Master regular expression syntax later replaced with a replacement character for each language syntax

Resources

  • Regular expression syntax *
https://baijiahao.baidu.com/s?id=1588848792548192879&wfr=spider&for=pc
  • Regular expressions of simple Markdown parser *
https://www.cnblogs.com/woai3c/p/10245792.html
  • On github existing css styles
https://www.cnblogs.com/qj0813/p/5110211.html
  • Add code html head and tail
https://blog.csdn.net/marksinoberg/article/details/51863506
  • js read the file data
https://blog.csdn.net/qq_29002631/article/details/80341744
  • Detailed h5 + js file operating method
https://segmentfault.com/a/1190000006600936
  • Js one supplementary data preservation processing method
https://blog.csdn.net/txp1993/article/details/70046443
  • Blob object
https://www.cnblogs.com/qinmengjiao123-123/p/5603057.html
  • In-depth understanding of the logic operators *
https://www.jb51.net/article/88781.htm#
  • ES6 arrow function
https://blog.csdn.net/github_38851471/article/details/79446722
  • supplement:

Guess you like

Origin blog.csdn.net/weixin_43645287/article/details/87687664