<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/149844>149844</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Mustache templates produce irregular whitespace
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-doc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          evelez7
      </td>
    </tr>
</table>

<pre>
    Mustache templates produce irregular whitespace in Clang-Doc HTML templates causing tags to be misaligned sometimes. This only seems to happen when a partial is invoked and it is not at the beginning of the line.

Take a partial that is declared at the beginning of the line, but nested within HTML tags. This produces expected whitespace, but the contents of the partial are not indented relative to the rest of the file.
```
        <div>
{{Partial}}
 <div>
```
If the partial is indented to try to match the indentation of the tags, such as: 
```
        <div>
            {{Partial}}
 </div>
```
then the rendered HTML looks something like:
```
 <div>
// rendered content
                            <div>
```

>From my testing, it is only the immediately proceeding tag that is affected.

@ilovepi 

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVNFu6zYM_Rr5hWigyE68PPghbRdswC6wh_6ALNE2F1kyJDpd9vWDHOfetFiHTTAgQCKPDg-PqVOi3iM2Yvcsdq-FnnkIscELOvyrLtpgr823ObE2AwLjODnNmGCKwc4GgWLEfnY6wvtAjGnS-dDDi9O-f3oNBn55-_bbQ6LRcyLfA-s-AQdoEUZK2mUSFlIYkWnEtIG3gRIE766QEMcldtDThB7eB_SgYdKRSTugBOQv4YwWtLdAnE98YNAMPCC02JP3-c3QLQeOPG6EPAp5fNNnfIDiQS_ZFo3TMQP-C4RQL9DODB4To4V34oH8Wq7u7xWsQiXAPyc0S-B3oe4IGdEEz-g53V-4U9IRl2LIW_Q5PaLTTBfMguTAiInvSR25W2V7uX7yCOsS5Yuliyh_zvf1s6iff789IerX_Mnjx5AHiF8_UloEX9lkEvGat1GzGZa426VmCv5OLAuSq02zGUAnUR7hP9CEh_U1ZaFO_8ias01uCnmLuZtLb1wI53Qz2pA76uiMojx-pvNBC3US6vQDZ-3VJ4af11dqCnk8xTDCeAXGxOT7rMzNtovfFw3HES1pRnfNFjKIdv1rvptUd91iqNXKopLkwgUnytIWtintoTzoApttvSu32-qgDsXQqEMp96ha05p9J6XeSVnKrWy72rZV17YFNUqqnazVdrtXSh42u7o1LWJZ7mpl950RlcRRk9s4dxk3IfYFpTRjs60OP1VV4XSLLi3jRCmzjAEbjFAqT5fY5KSndu6TqKSjxOkHDBM7_L_DppijawbmKZvq1qieeJjbjQmjUKeMvm5PUwx_oGGhTgvjJNRpJX1p1N8BAAD__3SrnHY">