Skip to content

Commit

Permalink
Merge pull request #437 from M4FFS/fix_md_target_youtube
Browse files Browse the repository at this point in the history
Fix youtube nodes in md renderer
  • Loading branch information
cassierecher authored Aug 3, 2020
2 parents 3c759c9 + 73443ba commit 5a8978d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions claat/render/md.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ func (mw *mdWriter) write(nodes ...types.Node) error {
// mw.survey(n)
case *types.HeaderNode:
mw.header(n)
//case *types.YouTubeNode:
// mw.youtube(n)
case *types.YouTubeNode:
mw.youtube(n)
}
if mw.err != nil {
return mw.err
Expand Down Expand Up @@ -262,3 +262,8 @@ func (mw *mdWriter) header(n *types.HeaderNode) {
mw.writeBytes(newLine)
}
}

func (mw *mdWriter) youtube(n *types.YouTubeNode) {
mw.newBlock()
mw.writeString(fmt.Sprintf(`<video id="%s"></video>`, n.VideoID))
}

0 comments on commit 5a8978d

Please sign in to comment.