Add prettyPrint definition for horizontal rule
This commit is contained in:
@@ -82,6 +82,7 @@ prettyPrint :: MdToken -> String
|
||||
prettyPrint (Para token) = "<p>" ++ T.unpack (wrapText defaultWrapSettings 70 (T.pack $ prettyPrint token)) ++ "</p>\n"
|
||||
prettyPrint (Table (thead : tokenGrid)) = "<table>\n<thead>\n<tr>\n" ++ concatMap (\x -> "<th>" ++ rstrip (prettyPrint x) ++ "</th>\n") thead ++ "</tr>\n</thead>\n" ++ "<tbody>\n" ++ concatMap (\x -> "<tr>\n" ++ concatMap (\y -> "<td>" ++ rstrip (prettyPrint y) ++ "</td>\n") x ++ "</tr>\n") tokenGrid ++ "</tbody>\n</table>\n"
|
||||
prettyPrint Linebreak = "<br />\n"
|
||||
prettyPrint HorizontalRule = "<hr>\n"
|
||||
prettyPrint (Line tokens) = concatMap prettyPrint tokens
|
||||
prettyPrint (Document tokens) = concatMap prettyPrint tokens
|
||||
prettyPrint token = show token
|
||||
|
Reference in New Issue
Block a user