• mardown other
  • linux/mac下git调用
  • git 环境变量
  • parsedown
  • HyperDown
  • github markdown
  • gfm GitHub Flavored Markdown Spec
  • stackedit -- markdown editor -- based on stackoverflow
  • markdown 编辑器 Notable
  • mardown other
    lv1= lv2= type=

    linux/mac下git调用

    必须解决id_rsa/known_hosts两个文件的访问、权限问题。
    eson环境,必须在这里??
    /Library/WebServer/.ssh
    还必须要copy known_hosts文件
    服务器上,copy到/home/www/.ssh,注意权限
    lv1= lv2= type=todo

    git 环境变量

    解决方案:直接使用绝对路径调用 git
    php shell cmd 
    使用php env 环境变量 可以解决,但这样有20ms左右的性能开销
    function get_time() {
    	list($usec, $sec) = explode(" ", microtime());
    	return ((float)$usec + (float)$sec);
    }
    $b = get_time();
    putenv("PATH=/usr/local/git/bin:" . trim(`echo \$PATH`));
    echo (get_time() - $b) * 1000 . "ms";
    最终方案:不要用service,新建一个用户,手动启动php-fpm
    or set_include_path?
    or 仅在需要调用git时设置此变量。目前仅测试环境需要,正式环境不需要git path设置。
    lv1= lv2= type=

    parsedown

    https://parsedown.org/
     https://parsedown.org/demo
    E:\projects\parsedown
    声称 GitHub flavored,但实测不符。markdown todo 
    ## test head2
    - test text
    ## test head2
    E:\uninote\mynote\basic\models\ParseDown.php
    SHA-1: 1fcc00b01c92a2b51c9b9b9da644d06aed8c6a84
    * ParseDown 1.7.3
    SHA-1: 9b2fae07a9b6e18b49fe56ee203dc9fc05da1cf8
    * 【bug】- 修复md转text文本空白符问题(所有空白符丢失)
    使用ParseDown的markdown解析功能,但修改为解析为纯文本,by collin
    hi, in this demo, it seems that Parsedown does't produce the result conforms to GFM, any ideas?
    ps: can you tell me the which exactly original parser is ? some url would be ok. thanks.
    https://github.com/erusev/parsedown/issues/725
    lv1= lv2= type=

    HyperDown

    League\CommonMark <[--
    http://a.md.my/my/index.html
    --]>
    E:\uninote\mynote\basic\models\HyperDown
    SegmentFault 维护
    https://github.com/SegmentFault/HyperDown
    问题:不活跃,issue 无人回答
    不遵循 CommonMrk spec
    不再使用
    lv1= lv2= type=

    github markdown

    What library does Github use for parsing markdown?
    https://stackoverflow.com/questions/39560644/what-library-does-github-use-for-parsing-markdown
    github/markup
    https://github.com/github/markup#markups
    gjtorikian/commonmarker
    https://github.com/gjtorikian/commonmarker
    A formal spec for GitHub Flavored Markdown
    https://github.blog/2017-03-14-a-formal-spec-for-github-markdown/

    gfm GitHub Flavored Markdown Spec

    https://github.github.com/gfm/
    CommonMark 的严格超集
    lv1= lv2= type=

    stackedit -- markdown editor -- based on stackoverflow

    https://github.com/benweet/stackedit
    https://stackedit.io/
    https://stackedit.io/app#
    lv1= lv2= type=

    markdown 编辑器 Notable

    https://zhuanlan.zhihu.com/p/57873149
    https://github.com/notable/notable