Port diagnostic markup to plugin.