Changes
remove border if no heading
<div class="template-documentation">
<div style="padding-bottom:3px; {{#if:{{{heading|defaultnotblank}}}||border-bottom:1px solid #aaa; }} margin-bottom:1ex;">
<span class="editsection plainlinks">[[[{{{1|{{SUBJECTPAGENAME}}/doc}}}|view]]]
[[{{fullurl:{{{1|{{SUBJECTPAGENAME}}/doc}}}|action=edit{{#ifexist: {{{1|{{SUBJECTSPACE}}:{{SUBJECTPAGENAME}}/doc}}} ||&preload=Template:Documentation/preload}}}} edit]]