In the spec of markdown:

For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces.

src: http://daringfireball.net/projects/markdown/syntax

I am wondering if there is any program/tool/API I can use to handle this issues? I like to solve this cause I would like to convert my blog from Drupal to Octopress.

  • I checked tidy and there is no 'break after/before block elements' options~
    – Drake Guan
    Feb 16, 2012 at 13:12

1 Answer 1


Pandoc can read (a subset of) HTML and can write Markdown.

  • Giving Pandoc a trial~
    – Drake Guan
    Feb 16, 2012 at 16:22
  • @DrakeGuan did you succeed? What about accepting this (IMO good) answer?
    – Wolf
    Dec 4, 2019 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.