mirror of
https://github.com/fengxxc/wechatmp2markdown.git
synced 2026-03-06 20:50:48 +08:00
feat: 文章中的图片转成base64存在生成的markdown里
This commit is contained in:
@@ -122,7 +122,8 @@ func formatCodeBlock(piece parse.Piece) string {
|
||||
}
|
||||
|
||||
func formatImage(piece parse.Piece) string {
|
||||
return "![" + piece.Attrs["alt"] + "](" + piece.Attrs["src"] + " \"" + piece.Attrs["title"] + "\")"
|
||||
// return "![" + piece.Attrs["alt"] + "](" + piece.Attrs["src"] + " \"" + piece.Attrs["title"] + "\")"
|
||||
return "![" + piece.Attrs["alt"] + "](data:image/png;base64," + piece.Val.(string) + ")"
|
||||
}
|
||||
|
||||
func formatLink(piece parse.Piece) string {
|
||||
|
||||
Reference in New Issue
Block a user