Uninote
Uninote
用户根目录
每日点滴

<!DOCTYPE html> <html><head><meta http-equiv='Content-Type' content='text/html; charset=utf8'><title>markdown sum</title> <script> var g_resRoot = '../../__res/'; var g_json_outline = '{"children":[{"children":[{"children":[],"level":2,"lvNumber":"1.1","text":"markdown test expmt 格式测试"},{"children":[],"level":2,"lvNumber":"1.2","text":"parse markdown"},{"children":[],"level":2,"lvNumber":"1.3","text":"表情 emoji"}],"level":1,"lvNumber":"1","text":"editor.md 当前使用;based on marked"},{"children":[{"children":[],"level":2,"lvNumber":"2.1","text":"basic"},{"children":[],"level":2,"lvNumber":"2.2","text":"heading"},{"children":[],"level":2,"lvNumber":"2.3","text":"如何实现markdown文章标题导航 双向"},{"children":[{"children":[],"level":3,"lvNumber":"2.4.1","text":"demo.html"}],"level":2,"lvNumber":"2.4","text":"code ana"},{"children":[],"level":2,"lvNumber":"2.5","text":"commits"},{"children":[],"level":2,"lvNumber":"2.6","text":"CommonMark compliance"}],"level":1,"lvNumber":"2","text":"marked core base"},{"children":[],"level":1,"lvNumber":"3","text":"markdown编辑、同步设计"},{"children":[{"children":[],"level":2,"lvNumber":"4.1","text":"git 环境变量"}],"level":1,"lvNumber":"4","text":"linux/mac下git调用"},{"children":[],"level":1,"lvNumber":"5","text":"commits"},{"children":[],"level":1,"lvNumber":"6","text":"sample log"},{"children":[],"level":1,"lvNumber":"7","text":"todo"},{"children":[],"level":1,"lvNumber":"8","text":"parsedown"},{"children":[],"level":1,"lvNumber":"9","text":"HyperDown"},{"children":[],"level":1,"lvNumber":"10","text":"剪贴板图片"},{"children":[],"level":1,"lvNumber":"11","text":"图片上传"},{"children":[],"level":1,"lvNumber":"12","text":"图片fetch 外网转存"},{"children":[{"children":[],"level":2,"lvNumber":"13.1","text":"test cases"}],"level":1,"lvNumber":"13","text":"markdown todo"},{"children":[],"level":1,"lvNumber":"14","text":"github markdown"},{"children":[],"level":1,"lvNumber":"15","text":"gfm GitHub Flavored Markdown Spec"},{"children":[{"children":[],"level":2,"lvNumber":"16.1","text":"test cases"}],"level":1,"lvNumber":"16","text":"CommonMark Spec"},{"children":[],"level":1,"lvNumber":"17","text":"markdown-it/markdown-it"},{"children":[],"level":1,"lvNumber":"18","text":"League\CommonMark"}],"level":0,"lvNumber":"","text":"markdown sum"}'; </script> <link rel='stylesheet' type='text/css' href='../../__res/common.css'><style>.s0{color:#000000;} .s1{color:#000000;} .s2{color:#c80000;} .s3{color:#000000;} .s4{color:#c80000;} .s5{color:#c80000;} .s6{color:#0000ff;} .s7{color:#000000;} .s8{color:#000000;} .s9{color:#000000;} .s10{color:#0000ff;} .s11{color:#0000ff;} .s12{color:#000000;} .s13{color:#000000;} .s14{color:#000000;} .s15{color:#0000ff;} </style> </head><body> <script src='../../__res/util.js'></script><div id='outline'> <li><a href='#ol_0' style='font-weight:bold; font-size:22px'>markdown sum</a></li> <li> <a href='#ol_1' >editor.md 当前使用;based on marked</a></li> <li> <a href='#ol_2' >markdown test expmt 格式测试</a></li> <li> <a href='#ol_3' >parse markdown</a></li> <li> <a href='#ol_4' >表情 emoji</a></li> <li> <a href='#ol_5' >marked core base</a></li> <li> <a href='#ol_6' >basic</a></li> <li> <a href='#ol_7' >heading</a></li> <li> <a href='#ol_8' >如何实现markdown文章标题导航 双向</a></li> <li> <a href='#ol_9' >code ana</a></li> <li> <a href='#ol_10' >demo.html</a></li> <li> <a href='#ol_11' >commits</a></li> <li> <a href='#ol_12' >CommonMark compliance</a></li> <li> <a href='#ol_13' >markdown编辑、同步设计</a></li> <li> <a href='#ol_14' >linux/mac下git调用</a></li> <li> <a href='#ol_15' >git 环境变量</a></li> <li> <a href='#ol_16' >commits</a></li> <li> <a href='#ol_17' >sample log</a></li> <li> <a href='#ol_18' >todo</a></li> <li> <a href='#ol_19' >parsedown</a></li> <li> <a href='#ol_20' >HyperDown</a></li> <li> <a href='#ol_21' >剪贴板图片</a></li> <li> <a href='#ol_22' >图片上传</a></li> <li> <a href='#ol_23' >图片fetch 外网转存</a></li> <li> <a href='#ol_24' >markdown todo</a></li> <li> <a href='#ol_25' >test cases</a></li> <li> <a href='#ol_26' >github markdown</a></li> <li> <a href='#ol_27' >gfm GitHub Flavored Markdown Spec</a></li> <li> <a href='#ol_28' >CommonMark Spec</a></li> <li> <a href='#ol_29' >test cases</a></li> <li> <a href='#ol_30' >markdown-it/markdown-it</a></li> <li> <a href='#ol_31' >League\CommonMark</a></li> </div>

<pre id='ol_0' class='title'>markdown sum</pre> <pre><d class='s0'></d></pre> <pre><d class='s0'><a href='https://www.markdownguide.org/basic-syntax#horizontal-rules'>https://www.markdownguide.org/basic-syntax#horizontal-rules</a></d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'><a href='..\software/editor.html#cb4dc583-4456-4f0e-8f50-f65ef432c72c'>Markdown </a></d></pre> <pre><d class='s0'></d></pre> <t id='8a635d70-7067-4ef3-a300-0e139223d5b8'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_1'>editor.md 当前使用;based on marked</h1> <pre><d class='s2'>在 core 基础上,提供 样式 同步滚动 界面 快捷键 等额外功能,语法高亮用的<a href='../prj_other.html#0759e7da-67c1-47ee-be05-cc64be6e29f5'>CodeMirror </a></d><d class='s2'></d></pre> <pre><d class='s3'>E:\uninote\mynote\basic\web\link\take -- old</d></pre> <pre><d class='s3'>E:\uninote\mynote-front\static\editor.md</d></pre> <pre><d class='s3'>〖E:\projects\editor.md〗</d></pre> <pre><d class='s3'><a href='http://a.md.my/'>http://a.md.my/</a></d></pre> <pre><d class='s3'> <a href='http://a.md.my/examples/index.html'>http://a.md.my/examples/index.html</a></d><d class='s0'> </d><d class='s4'>-- test</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>online:</d></pre> <pre><d class='s0'><a href='https://github.com/pandao/editor.md'>https://github.com/pandao/editor.md</a></d></pre> <pre><d class='s0'> <a href='https://pandao.github.io/editor.md/'>https://pandao.github.io/editor.md/</a></d></pre> <pre><d class='s0'> </d><d class='s4'>index:</d><d class='s0'></d></pre> <pre><d class='s3'> <a href='https://pandao.github.io/editor.md/examples/index.html'>https://pandao.github.io/editor.md/examples/index.html</a></d></pre> <pre><d class='s5'> full examples:</d><d class='s3'></d></pre> <pre><d class='s3'> <a href='https://pandao.github.io/editor.md/examples/full.html'>https://pandao.github.io/editor.md/examples/full.html</a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s1'>mynote-</d><d class='s0'>front base on(copy from): 63786e671e2c1a1fd2be25b54a8910cd3bbc7c0a of </d><d class='s3'>E:\uninote\mynote-front\static\editor.md</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <t id='d75ee3d6-34dc-42ec-a64f-cb97a8c833be'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h2 id='ol_2'>markdown test expmt 格式测试</h2> <pre><d class='s0'>uninote、掘金</d></pre> <pre><d class='s0'>E:\projects\github-test</d></pre> <pre><d class='s0'> E:\projects\github-test\lc</d></pre> <pre><d class='s0'>E:\uninote\mynote-site-docs\lc</d></pre> <pre><d class='s0'>E:\projects\gogs-test</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s4'>editor.md local:</d><d class='s0'></d></pre> <pre><d class='s3'><a href='http://a.md.my/examples/index.html'>http://a.md.my/examples/index.html</a></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s5'>markedjs local:</d><d class='s3'></d></pre> <pre><d class='s3'><a href='http://a.mdcore.my/docs/demo/index.html'>http://a.mdcore.my/docs/demo/index.html</a></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s4'>phpleague commonMark & HyperDown(思否)</d><d class='s0'></d></pre> <pre><d class='s6'><a href='http://a.md.my/my/index.html'>http://a.md.my/my/index.html</a></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>js commonmark:</d></pre> <pre><d class='s0'><a href='https://github.com/markdown-it/markdown-it'>https://github.com/markdown-it/markdown-it</a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>parsedown</d></pre> <pre><d class='s1'><a href='https://parsedown.org/demo'>https://parsedown.org/demo</a></d><d class='s0'></d></pre> </t> <pre><d class='s0'></d></pre> <h2 id='ol_3'>parse markdown</h2> <pre><d class='s0'>E:\uninote\mynote-front\static\editor.md\src\editormd.js</d></pre> <pre><d class='s0'> /**</d></pre> <pre><d class='s0'> * 解析和保存Markdown代码</d></pre> <pre><d class='s0'> * Parse & Saving Markdown source code</d></pre> <pre><d class='s0'> * </d></pre> <pre><d class='s0'> * @returns {editormd} 返回editormd的实例对象</d></pre> <pre><d class='s0'> /</d></pre> <pre><d class='s0'> </d></pre> <pre><d class='s0'> save : function() {</d></pre> <pre><d class='s0'></d></pre> <h2 id='ol_4'>表情 emoji</h2> <pre><d class='s7'><a href='https://www.webfx.com/tools/emoji-cheat-sheet/'>https://www.webfx.com/tools/emoji-cheat-sheet/</a></d></pre> <pre><d class='s8'>掘金禁用、github gogs 启用</d><d class='s7'></d></pre> <pre><d class='s7'></d></pre> <pre><d class='s7'>E:\projects\editor.md\examples\emoji.html</d></pre> <pre><d class='s7'><a href='http://a.md.my/examples/emoji.html'>http://a.md.my/examples/emoji.html</a></d></pre> <pre><d class='s7'>可以配置 emoji 的 hosts</d></pre> </t> <pre><d class='s1'></d></pre> <t id='d4725f18-9f6d-40c4-a01d-bb0f58355fcb'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_5'>marked core base</h1> <pre><d class='s4'></d></pre> <pre><d class='s4'>上万的start,fork 2k+</d></pre> <pre><d class='s4'><img src='..\pic\b8c15e2d9491364a7000546f42882878.jpg' /></d><d class='s0'></d></pre> <pre><d class='s8'>仅提供 md 转 html,样式不提供;太依赖正则,很难修改。</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>〖E:\projects\marked〗</d></pre> <pre><d class='s0'><a href='https://github.com/chjj/marked'>https://github.com/chjj/marked</a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s5'>local:</d><d class='s3'></d></pre> <pre><d class='s3'><a href='http://a.mdcore.my/docs/demo/index.html'>http://a.mdcore.my/docs/demo/index.html</a></d></pre> <pre><d class='s3'><img src='..\pic\aad6c194462ae6c7f051c4e6f181bae3.jpg' /></d><d class='s1'></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s3'>查看 lexer 结果:</d></pre> <pre><d class='s3'><img src='..\pic\96cd95449e7f24ddac621ae330d83b8e.jpg' /></d><d class='s3'></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s3'>online test demo</d></pre> <pre><d class='s3'><a href='https://marked.js.org/demo/'>https://marked.js.org/demo/</a></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <h2 id='ol_6'>basic</h2> <pre><d class='s0'><!doctype html></d></pre> <pre><d class='s0'><html></d></pre> <pre><d class='s0'><head></d></pre> <pre><d class='s0'> <meta charset="utf-8"/></d></pre> <pre><d class='s0'> <title>Marked in the b</d></pre> <pre><d class='s0'>rowser</title></d></pre> <pre><d class='s0'></head></d></pre> <pre><d class='s0'><body></d></pre> <pre><d class='s0'> <div id="content"></div></d></pre> <pre><d class='s0'> <script src="<a href='https://cdn.jsdelivr.net/npm/marked/marked.min.js'>https://cdn.jsdelivr.net/npm/marked/marked.min.js</a>"></script></d></pre> <pre><d class='s0'> <script></d></pre> <pre><d class='s0'> document.getElementById('content').innerHTML =</d></pre> <pre><d class='s0'> marked('# Marked in browser\n\nRendered by marked.');</d></pre> <pre><d class='s0'> </script></d></pre> <pre><d class='s0'></body></d></pre> <pre><d class='s0'></html></d></pre> <pre><d class='s6'></d></pre> <h2 id='ol_7'>heading</h2> <pre><d class='s0'><!doctype html></d></pre> <pre><d class='s0'><html></d></pre> <pre><d class='s0'><head></d></pre> <pre><d class='s0'> <meta charset="utf-8"/></d></pre> <pre><d class='s0'> <title>Marked in the browser</title></d></pre> <pre><d class='s0'></head></d></pre> <pre><d class='s0'><body></d></pre> <pre><d class='s0'> <div id="content"></div></d></pre> <pre><d class='s0'> <script src="<a href='https://cdn.jsdelivr.net/npm/marked/marked.min.js'>https://cdn.jsdelivr.net/npm/marked/marked.min.js</a>"></script></d></pre> <pre><d class='s0'> <script></d></pre> <pre><d class='s0'> </d></pre> <pre><d class='s0'> var content = '# Marked in browser\n\n### Install from an Archive File\nRendered by marked.';</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'> const renderer = new marked.Renderer()</d></pre> <pre><d class='s0'> let index = -1</d></pre> <pre><d class='s0'> renderer.heading = function (text, level) {</d></pre> <pre><d class='s0'> return &lt;h${level} id="titleAnchor-${index++}"&gt;${text}&lt;/h${level}&gt;</d></pre> <pre><d class='s0'> }</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'> document.getElementById('content').innerHTML = marked(content, { renderer: renderer });</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'> </script></d></pre> <pre><d class='s0'></body></d></pre> <pre><d class='s0'></html></d></pre> <pre><d class='s1'></d></pre> <h2 id='ol_8'>如何实现markdown文章标题导航 双向</h2> <pre><d class='s6'><a href='https://www.u3xyz.com/detail/32#titleAnchor-7'>https://www.u3xyz.com/detail/32#titleAnchor-7</a></d><d class='s1'></d></pre> <pre><d class='s1'><img src='..\pic\8eee03ab9e97a0fce501a763a3007f4d.jpg' /></d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> <h2 id='ol_9'>code ana</h2> <pre><d class='s0'>语法分析在 </d><d class='s4'>worker.js</d><d class='s0'> 中:</d></pre> <pre><d class='s0'>Lexer.prototype.token = function(src, top) {</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'> case 'parse':</d></pre> <pre><d class='s0'> var startTime = new Date();</d></pre> <pre><d class='s0'> var lexed = marked.lexer(e.data.markdown, e.data.options);</d></pre> <pre><d class='s0'> var lexedList = [];</d></pre> <pre><d class='s0'> for (var i = 0; i < lexed.length; i++) {</d></pre> <pre><d class='s1'></d></pre> <h3 id='ol_10'>demo.html</h3> <pre><d class='s9'>官方demo的</d><d class='s8'>解析在worker中,不便于调试</d><d class='s0'>:<a href='http://a.mdcore.my/docs/demo/index.html'>http://a.mdcore.my/docs/demo/index.html</a></d></pre> <pre><d class='s8'>可以用此简单版 demo.html</d></pre> <pre><d class='s8'></d></pre> <h2 id='ol_11'>commits</h2> <pre><d class='s10'>使用本地 js,因此选择版本功能失效</d><d class='s0'></d></pre> <pre><d class='s11'></d></pre> <h2 id='ol_12'>CommonMark compliance</h2> <pre><d class='s6'><a href='https://github.com/markedjs/marked/issues/1202'>https://github.com/markedjs/marked/issues/1202</a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>PR #1160 looks to run Marked against the CommonMark spec test cases: <a href='http://spec.commonmark.org/0.28/spec.json'>http://spec.commonmark.org/0.28/spec.json</a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>So far the results show that we are roughly 60% spec-compliant.</d><d class='s6'></d></pre> </t> <pre><d class='s1'></d></pre> <t id='e1de76f7-c7cb-45ec-bfcd-6bcf8f08e2c2'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h1 id='ol_13'>markdown编辑、同步设计</h1> <pre><d class='s1'>前端传参:登录、md内容、md path、git log hash、[user message]</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>client a.md v4 -> v4.1</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>server: a.md v6</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>controller:</d></pre> <pre><d class='s1'>1、new md</d></pre> <pre><d class='s1'>2、编辑 md</d></pre> <pre><d class='s1'>3、save md</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'> 0 .git/index.lock (手动),if fail , 等待重试</d></pre> <pre><d class='s1'> 1 reset --hard hash</d></pre> <pre><d class='s1'> 2 将md内容写入md path</d></pre> <pre><d class='s1'> 3 git add ; git add -u; git commit -m "user message"</d></pre> <pre><d class='s1'> 4 git rebase to v6</d></pre> <pre><d class='s1'> if(suc) {</d></pre> <pre><d class='s1'> v7</d></pre> <pre><d class='s1'> git push // git server,一定保证成功</d></pre> <pre><d class='s1'> return ok, & v7</d></pre> <pre><d class='s1'> } else {</d></pre> <pre><d class='s1'> conflict // 报告用户,暂不解决</d></pre> <pre><d class='s1'> return fail</d></pre> <pre><d class='s1'> }</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'> 5 remove .git/index.lock</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>git add </d></pre> <pre><d class='s1'>git add -u</d></pre> <pre><d class='s1'>git commit -m "update"</d></pre> <pre><d class='s1'>git push origin master</d></pre> </t> <pre><d class='s11'></d></pre> <t id='05f365ec-f868-42fd-b5fc-48cd1f2827a4'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_14'>linux/mac下git调用</h1> <pre><d class='s1'>必须解决id_rsa/known_hosts两个文件的访问、权限问题。</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>eson环境,必须在这里??</d></pre> <pre><d class='s1'>/Library/WebServer/.ssh</d></pre> <pre><d class='s1'>还必须要copy known_hosts文件</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>服务器上,copy到/home/www/.ssh,注意权限</d></pre> <pre><d class='s1'><img src='..\pic\6faeee63cb5dccd92f50bdbc0ee59e63.jpg' /></d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> <t id='cfee5fb7-2914-4c66-a24d-65b9eb0fd939'> <pre class='tnd_head'>lv1= lv2= type=todo</pre> <h2 id='ol_15'>git 环境变量</h2> <pre><d class='s2'>解决方案:直接使用绝对路径调用 git</d><d class='s1'></d></pre> <pre><d class='s1'><a href='..\php/shell_cmd.html'>php shell cmd </a></d></pre> <pre><d class='s11'></d></pre> <pre><d class='s0'>使用<a href='..\php/php.html#12c4ec93-117c-4157-bde7-68ed80ab6d18'>php env 环境变量 </a></d><d class='s0'>可以解决,</d><d class='s8'>但这样有20ms左右的性能开销</d><d class='s0'>。</d></pre> <pre><d class='s7'>function get_time() {</d></pre> <pre><d class='s7'> list($usec, $sec) = explode(" ", microtime());</d></pre> <pre><d class='s7'> return ((float)$usec + (float)$sec);</d></pre> <pre><d class='s7'>}</d></pre> <pre><d class='s7'>$b = get_time();</d></pre> <pre><d class='s8'>putenv("PATH=/usr/local/git/bin:" . trim(echo \$PATH));</d><d class='s7'></d></pre> <pre><d class='s7'>echo (get_time() - $b) * 1000 . "ms";</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s7'>最终方案:不要用service,新建一个用户,手动启动php-fpm</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>or set_include_path?</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>or </d><d class='s8'>仅在需要调用git时设置此变量。目前仅测试环境需要,正式环境不需要git path设置。</d><d class='s0'></d></pre> </t> <pre><d class='s11'></d></pre> </t> <pre><d class='s1'></d></pre> <h1 id='ol_16'>commits</h1> <pre><d class='s12'>SHA-1: 86d6c2ad63680b462762b098ef8898a179ad6d00</d></pre> <pre><d class='s12'> save</d><d class='s13'>后通知workman更新文章索引</d></pre> <pre><d class='s13'></d></pre> <pre><d class='s12'>SHA-1: 6d401ec0b4b3f2d9cd39ecc463317b3c2692201e</d></pre> <pre><d class='s12'> git</d><d class='s13'>路径传入save.sh,并且捕获错误输出</d><d class='s11'></d></pre> <pre><d class='s3'></d></pre> <h1 id='ol_17'>sample log</h1> <pre><d class='s3'>2018-06-17 18:42:19 [223.98.184.56][-][-][info][shell] </d></pre> <pre><d class='s3'> HEAD is now at a033b1b update </d></pre> <pre><d class='s3'></d></pre> <pre><d class='s3'>2018-06-17 18:42:19 [223.98.184.56][-][-][info][shell] </d></pre> <pre><d class='s3'> [master 8fc17ba] update</d></pre> <pre><d class='s3'> 1 file changed, 2 insertions(+)</d></pre> <pre><d class='s3'> create mode 100644 sx2.md</d></pre> <pre><d class='s3'>Current branch master is up to date.</d></pre> <pre><d class='s3'>To git@121.40.183.99:mynote_1068799191.git</d></pre> <pre><d class='s3'> a033b1b..8fc17ba master -> master</d></pre> <pre><d class='s3'> % Total % Received % Xferd Average Speed Time Time Time Current</d></pre> <pre><d class='s3'> Dload Upload Total Spent Left Speed</d></pre> <pre><d class='s3'> 0 42 0 42 0 0 5688 0 --:--:-- --:--:-- --:--:-- 42000</d></pre> <pre><d class='s5'>A_file_list ok - ./docs/1068799191/sx2.md</d></pre> <pre><d class='s1'></d></pre> <t id='1d8adbad-f7fb-4c0e-bb87-8a8df1b37b7d'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_18'>todo</h1> <pre><d class='s3'>1 log什么时候flush? <a href='eson_todo_old.html#5c8134a1-4d4b-4d2d-9b57-733bad075762'>log 研究yii的日志、use stack </a></d><d class='s1'></d></pre> <pre><d class='s3'>2 返回值报错 status != 0 的处理</d></pre> <pre><d class='s3'></d></pre> <pre><d class='s3'>测试点:windows下中文</d></pre> </t> <pre><d class='s1'></d></pre> <t id='53148d1c-9a98-4e03-9617-9c5b17be1855'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_19'>parsedown</h1> <pre><d class='s7'><a href='https://parsedown.org/'>https://parsedown.org/</a></d><d class='s1'></d></pre> <pre><d class='s1'> <a href='https://parsedown.org/demo'>https://parsedown.org/demo</a></d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>声称 GitHub flavored,但实测不符。<a href='markdown.html#ec75a1b5-07b3-4535-8447-b92f02943c6a'>markdown todo </a></d></pre> <pre><d class='s0'>## test head2</d></pre> <pre><d class='s0'>- test text</d></pre> <pre><d class='s0'>## test head2</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>E:\uninote\mynote\basic\models\ParseDown.php</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>SHA-1: 1fcc00b01c92a2b51c9b9b9da644d06aed8c6a84</d></pre> <pre><d class='s1'> ParseDown 1.7.3</d></pre> <pre><d class='s1'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>SHA-1: 9b2fae07a9b6e18b49fe56ee203dc9fc05da1cf8</d></pre> <pre><d class='s0'>* 【bug】- 修复md转text文本空白符问题(所有空白符丢失)</d></pre> <pre><d class='s0'>使用ParseDown的markdown解析功能,但修改为解析为纯文本,by collin</d><d class='s12'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>hi, in this demo, it seems that Parsedown does't produce the result conforms to GFM, any ideas?</d></pre> <pre><d class='s0'>ps: can you tell me the which exactly original parser is ? some url would be ok. thanks.</d></pre> <pre><d class='s0'><a href='https://github.com/erusev/parsedown/issues/725'>https://github.com/erusev/parsedown/issues/725</a></d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> </t> <pre><d class='s1'></d></pre> <t id='a97401fe-a9f3-4362-b8a9-6f68c3a89984'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_20'>HyperDown</h1> <pre><d class='s1'>E:\uninote\mynote\basic\models\HyperDown</d></pre> <pre><d class='s14'>SegmentFault</d><d class='s1'> </d><d class='s0'>维护</d></pre> <pre><d class='s0'><a href='https://github.com/SegmentFault/HyperDown'>https://github.com/SegmentFault/HyperDown</a></d></pre> <pre><d class='s8'>问题:不活跃,issue 无人回答</d></pre> <pre><d class='s8'>不遵循 CommonMrk spec</d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s8'>不再使用</d><d class='s0'></d></pre> </t> <pre><d class='s1'></d></pre> <h1 id='ol_21'>剪贴板图片</h1> <pre><d class='s7'>Editor.insertValue(img_str);</d></pre> <pre><d class='s1'></d></pre> <t id='86e97787-1afd-4177-9085-8ab75528bafa'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_22'>图片上传</h1> <pre><d class='s15'>http://{{host}}/api/markdown/uploadpic</d></pre> <pre><d class='s0'>SHA-1: 21bc3e3cd130c39d831939a00f1cda9c5818331c</d></pre> <pre><d class='s0'>* 图片上传class,copy from basic\web\link\take\lib\php</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s8'>* 使用控件上传时,必须要符合控件约定的格式</d><d class='s0'></d></pre> <pre><d class='s0'>* 图片上传接口(临时版本)</d></pre> </t> <pre><d class='s15'></d></pre> <t id='2791ed5e-3d6c-489a-b60d-3e44f7bf8687'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_23'>图片fetch 外网转存</h1> <pre><d class='s3'>http://{{host}}/api/markdown/fetchpic</d></pre> <pre><d class='s0'>SHA-1: be0020e80e6ada89f704396807011f51006c9120</d></pre> <pre><d class='s0'>* 外网图片fetch时,用 Content-Type 值作为后缀名存储</d></pre> <pre><d class='s0'>SHA-1: dac4ffb14d3292a799ca08fd7dbe9911c102e2ad</d></pre> <pre><d class='s0'>* 图片fetch验证:内网不要获取</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>返回绝对地址</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>test case</d><d class='s3'></d></pre> <pre><d class='s3'>pic</d></pre> <pre><d class='s3'><a href='https://gss0.bdstatic.com/5bVWsj_p_tVS5dKfpU_Y_D3/res/r/image/2017-09-27/297f5edb1e984613083a2d3cc0c5bb36.png'>https://gss0.bdstatic.com/5bVWsj_p_tVS5dKfpU_Y_D3/res/r/image/2017-09-27/297f5edb1e984613083a2d3cc0c5bb36.png</a></d></pre> <pre><d class='s3'><a href='https://user-gold-cdn.xitu.io/2019/5/29/16b03fc4381323d1'>https://user-gold-cdn.xitu.io/2019/5/29/16b03fc4381323d1</a></d></pre> <pre><d class='s3'>webp</d></pre> <pre><d class='s3'><a href='https://user-gold-cdn.xitu.io/2019/5/29/16b03fc4381323d1?imageView2/0/w/1280/h/960/format/webp/ignore-error/1'>https://user-gold-cdn.xitu.io/2019/5/29/16b03fc4381323d1?imageView2/0/w/1280/h/960/format/webp/ignore-error/1</a></d></pre> <pre><d class='s3'>301</d></pre> <pre><d class='s3'><a href='http://a.pjkit.my/tools/www_saver/tests/status_code/301.php'>http://a.pjkit.my/tools/www_saver/tests/status_code/301.php</a></d></pre> <pre><d class='s3'></d></pre> <pre><d class='s3'>掘金,如果浏览器支持,会返回webp格式</d></pre> </t> <pre><d class='s1'></d></pre> <t id='ec75a1b5-07b3-4535-8447-b92f02943c6a'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_24'>markdown todo</h1> <pre><d class='s1'><a href='../todo_pvt.html#6a490df2-4538-4c32-acb2-b2ef461d3637'>客户端 markdown编辑器 </a></d></pre> <pre><d class='s15'></d></pre> <pre><d class='s15'>markdown to text for 摘要 & es 索引</d></pre> <pre><d class='s15'></d></pre> <pre><d class='s8'>双向同步滚动体验不好,可以选择是否同步</d></pre> <pre><d class='s15'></d></pre> <pre><d class='s15'><img src='..\pic\1e5b8c14bed78e83d29988de1a3f16b0.jpg' /></d><d class='s15'></d></pre> <pre><d class='s1'></d></pre> <t id='1470d49f-581d-424e-9fc0-8bbe5bbbc256'> <pre class='tnd_head'>lv1= lv2= type=</pre> <pre><d class='s1'>mardown解析:分布式 php</d></pre> <pre><d class='s1'>markdown转纯文本 for es</d></pre> <pre><d class='s1'><a href='../todo_pvt.html#6a490df2-4538-4c32-acb2-b2ef461d3637'>客户端 markdown编辑器 </a></d></pre> <pre><d class='s1'>整理所有的解析器,做一个对比</d></pre> <pre><d class='s1'><a href='markdown.html'>markdown sum </a></d></pre> <pre><d class='s1'><a href='mynote_todo.html#2f566d2a-9e33-4627-9ba2-80bee6432ac2'>markdown 转纯文本有问题 </a></d></pre> </t> <pre><d class='s15'></d></pre> <h2 id='ol_25'>test cases</h2> <pre><d class='s0'></d></pre> <pre><d class='s8'>list 后面需要两个换行(使用正则匹配,很难修改),掘金不用,其他都需要,包括github:</d><d class='s0'></d></pre> <pre><d class='s0'>## test head2</d></pre> <pre><d class='s0'>- test text</d></pre> <pre><d class='s0'>## test head2</d></pre> <pre><d class='s8'></d></pre> <pre><d class='s8'>取消自动编号,现在不能有空格</d></pre> <pre><d class='s15'></d></pre> <pre><d class='s15'></d></pre> <pre><d class='s7'>a</d></pre> <pre><d class='s7'>b</d></pre> <pre><d class='s7'></d></pre> <pre><d class='s7'>c</d></pre> <pre><d class='s7'>d</d></pre> <pre><d class='s7'></d></pre> <pre><d class='s0'>http:/abc.com</d><d class='s15'></d></pre> </t> <pre><d class='s1'></d></pre> <t id='6ca7c669-f73b-4e36-8ba6-8509562cb0fb'> <pre class='tnd_head'>lv1= lv2= type=</pre> <h1 id='ol_26'>github markdown</h1> <pre><d class='s0'>What library does Github use for parsing markdown?</d></pre> <pre><d class='s0'><a href='https://stackoverflow.com/questions/39560644/what-library-does-github-use-for-parsing-markdown'>https://stackoverflow.com/questions/39560644/what-library-does-github-use-for-parsing-markdown</a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>github/markup</d></pre> <pre><d class='s0'><a href='https://github.com/github/markup#markups'>https://github.com/github/markup#markups</a></d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>gjtorikian/commonmarker</d></pre> <pre><d class='s0'><a href='https://github.com/gjtorikian/commonmarker'>https://github.com/gjtorikian/commonmarker</a></d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'></d></pre> <h1 id='ol_27'>gfm GitHub Flavored Markdown Spec</h1> <pre><d class='s0'><a href='https://github.github.com/gfm/'>https://github.github.com/gfm/</a></d><d class='s1'></d></pre> <pre><d class='s4'>CommonMark 的严格超集</d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> </t> <pre><d class='s0'></d></pre> <h1 id='ol_28'>CommonMark Spec</h1> <pre><d class='s0'><a href='https://spec.commonmark.org/0.29/#why-is-a-spec-needed-'>https://spec.commonmark.org/0.29/#why-is-a-spec-needed-</a></d></pre> <pre><d class='s0'>Version 0.29 (2019-04-06)</d></pre> <pre><d class='s0'></d></pre> <h2 id='ol_29'>test cases</h2> <pre><d class='s0'><a href='http://spec.commonmark.org/0.29/spec.json'>http://spec.commonmark.org/0.29/spec.json</a></d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_30'>markdown-it/markdown-it</h1> <pre><d class='s0'>js 实现版本</d></pre> <pre><d class='s0'><a href='https://github.com/markdown-it/markdown-it'>https://github.com/markdown-it/markdown-it</a></d></pre> <pre><d class='s0'><img src='..\pic\9dedddc0013668c566b65a364c78bacd.jpg' /></d><d class='s0'></d></pre> <pre><d class='s0'></d></pre> <h1 id='ol_31'>League\CommonMark</h1> <pre><d class='s6'></d></pre> <pre><d class='s6'><a href='http://a.md.my/my/index.html'>http://a.md.my/my/index.html</a></d></pre> <pre><d class='s6'></d></pre> <pre><d class='s0'>php 实现版本</d></pre> <pre><d class='s0'><a href='https://commonmark.thephpleague.com'>https://commonmark.thephpleague.com</a></d><d class='s1'></d></pre> <pre><d class='s0'>thephpleague/commonmark</d></pre> <pre><d class='s0'></d></pre> <pre><d class='s0'>Highly-extensible PHP Markdown parser based on the CommonMark spec. <a href='https://commonmark.thephpleague.com'>https://commonmark.thephpleague.com</a></d></pre> <pre><d class='s0'><a href='https://github.com/thephpleague/commonmark'>https://github.com/thephpleague/commonmark</a></d><d class='s1'></d></pre> <pre><d class='s1'></d></pre> <pre><d class='s1'>composer require league/commonmark</d></pre> </body></html>

iindex

mynote

点赞(0) 阅读(50) 举报
目录
标题