Utility to convert standard HTML to Hamlet format