markup port from 0.3.0-pre.1 to 0.2.4