titleToRST lst = do
  contents <- inlineListToRST lst
  let titleLength = length $ (render Nothing contents :: String)
  let border = text (replicate titleLength '=')
  return $ border $$ contents $$ border

-- | Convert Pandoc block element to RST. 
titleToRST lst = do
  contents <- inlineListToRST lst
  let titleLength = length $ (render Nothing contents :: String)
  let border = text (replicate titleLength '=')
  return $ border $$ contents $$ border

-- | Convert Pandoc block element to RST. 
titleToRST lst = do
  contents <- inlineListToRST lst
  let titleLength = length $ (render Nothing contents :: String)
  let border = text (replicate titleLength '=')
  return $ border $$ contents $$ border

-- | Convert Pandoc block element to RST. 