remove leading whitespace from inline markdown and estimate offset
properly format multiple line markdown