convert html to hamlet