Auto-surround top level Markdown templates

Auto-surround top level Markdown templates with default template and
refine test for top level templates