mirror of
https://github.com/tenox7/wrp.git
synced 2024-11-21 19:30:48 +00:00
add todo for goldmark
This commit is contained in:
parent
ee0e72f246
commit
b92478fd6a
5
wrp.go
5
wrp.go
@ -35,9 +35,8 @@ import (
|
|||||||
"text/template"
|
"text/template"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/JohannesKaufmann/html-to-markdown/plugin"
|
|
||||||
|
|
||||||
h2m "github.com/JohannesKaufmann/html-to-markdown"
|
h2m "github.com/JohannesKaufmann/html-to-markdown"
|
||||||
|
"github.com/JohannesKaufmann/html-to-markdown/plugin"
|
||||||
"github.com/MaxHalford/halfgone"
|
"github.com/MaxHalford/halfgone"
|
||||||
"github.com/chromedp/cdproto/css"
|
"github.com/chromedp/cdproto/css"
|
||||||
"github.com/chromedp/cdproto/emulation"
|
"github.com/chromedp/cdproto/emulation"
|
||||||
@ -443,6 +442,8 @@ func (rq *wrpReq) toMarkdown() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Printf("Got %v bytes md from %v", len(md), rq.url)
|
log.Printf("Got %v bytes md from %v", len(md), rq.url)
|
||||||
|
// TODO: Use GoldMark instead
|
||||||
|
// https://github.com/yuin/goldmark
|
||||||
p := parser.NewWithExtensions(parser.CommonExtensions)
|
p := parser.NewWithExtensions(parser.CommonExtensions)
|
||||||
d := p.Parse([]byte(md))
|
d := p.Parse([]byte(md))
|
||||||
ast.WalkFunc(d, func(node ast.Node, entering bool) ast.WalkStatus {
|
ast.WalkFunc(d, func(node ast.Node, entering bool) ast.WalkStatus {
|
||||||
|
Loading…
Reference in New Issue
Block a user