Template changes for markup syntax #4801

Also added support for displaying rst as html