Comments (20)
呵呵,有难度, 必要性不高呢
这需要另外写一个markdown渲染器
from gor.
貌似 go get github.com/russross/blackfriday
就支持
from gor.
等我找台机器试试
from gor.
我的意思是更改markdown渲染库
from gor.
你就不给我一个pull request的机会
from gor.
呵呵,那你来试试呗, 两个markdown的API不太一样
from gor.
我试了一下貌似搞不定。。。
from gor.
markdown的操作,都在markdown.go里面的
from gor.
package gor
import (
"bytes"
"github.com/russross/blackfriday"
"log"
)
func MarkdownToHtml(content string) (str string) {
defer func() {
e := recover()
if e != nil {
log.Println(e)
}
}()
str = blackfriday.MarkdownCommon(content)
return
}
没法支持
``` language
```
这样的代码高亮
from gor.
我试试
from gor.
更换markdown库了
from gor.
great
from gor.
貌似还不是不能按语言, 先不管了
from gor.
有进展么?
目前有没有go库支持GFM的啊
from gor.
我用的markdown库已经基本兼容GFM的呢
from gor.
你用的是blackfriday是吧?
blackfriday 目前还有一丝没有兼容.
比如
# text
* item1
* item2
是不行的.
# text
* item1
* item2
才可以
而纯正的GFM是上面两种都可以渲染出list的.
不知道你那边表现如何,还望告知,多谢 :)
from gor.
就是blackfriday, 其实也就这样了, 纯正的GFM只有ruby版
from gor.
sundown 的不都是GFM么
from gor.
sundown是c写的吧..
其实各种实现都有各种坑,因为markdown的规格有各种没考虑到,
对此pandoc的作者专门做了一个网页吐槽
http://johnmacfarlane.net/babelmark2/faq.html
On Thu, Oct 3, 2013 at 8:53 PM, 王超 [email protected] wrote:
sundown 的不都是GFM么
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-25617768
.
from gor.
在 sundown 的 readme 里面倒是有推荐了两个 go 写的 markdown解析器,goskirt 跟 upskirt.go,不过不知道效果如何
其实吧, sundown 它自己都已经 deprecated 了。。。
from gor.
Related Issues (20)
- Debian 8 x64中安装gor错误 HOT 1
- 网站地址更新
- 多个平台编译版本 HOT 1
- 安装到子目录时sitemap与rss网址出错 HOT 5
- config.yml中summary_lines设置BUG HOT 1
- 多说使用问题
- Use SPDX license HOT 3
- 我也用gor开了博客,望添加连接 HOT 2
- 提交两个gor站点 HOT 1
- 语法高亮问题 HOT 1
- 有支持响应式的theme吗? HOT 1
- 生成sitemap时 lastmod 时间格式问题 HOT 3
- Use English language for documentation, commits, etc.
- js not found HOT 3
- github.com/howeyc/fsnotify HOT 2
- 手机页面适配的问题 HOT 2
- reStructuredText HOT 1
- 我的博客混沌的云 目前不再使用Gor,迁移到了Ghost上去,望知悉 HOT 2
- 建议提供国内访问统计和多说支持 HOT 2
- config.yml中posts:latest变量不起作用 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gor.