truncating markdown text may lead to wrong markdown parsing, truncate the final html instead

fixes #34