-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue
When a template is rendered that extends a child template using #extend, all but the first line of the child template will have wrong indentation.
Vapor version
4
Operating system and version
Ubuntu 22.04
Swift version
6
Steps to reproduce
Parent template:
<!DOCTYPE html>
<html>
<head>
<style>
th, td { padding: 0 15px; }
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Component ID</th>
<th>DummyModel1</th>
<th>DummyModel2</th>
</tr>
</thead>
<tbody>
#for(component in components):
#extend("DummyComponent")
#endfor
</tbody>
</table>
<script src="/mist.js"></script>
</body>
</html>Child template:
<tr mist-component="DummyComponent" mist-id="#(component.dummymodel1.id)">
<td>#(component.dummymodel1.id)</td>
<td>#(component.dummymodel1.text)</td>
<td>#(component.dummymodel2.text2)</td>
</tr>Outcome
Rendered parent template:
<!DOCTYPE html>
<html>
<head>
<style>
th, td { padding: 0 15px; }
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Component ID</th>
<th>DummyModel1</th>
<th>DummyModel2</th>
</tr>
</thead>
<tbody>
<tr mist-component="DummyComponent" mist-id="9758DFBB-2687-4089-AEB5-D839DB620DB6">
<td>9758DFBB-2687-4089-AEB5-D839DB620DB6</td>
<td>leaf</td>
<td>client</td>
</tr>
</tbody>
</table>
<script src="/mist.js"></script>
</body>
</html>This:
<tr mist-component="DummyComponent" mist-id="9758DFBB-2687-4089-AEB5-D839DB620DB6">
<td>9758DFBB-2687-4089-AEB5-D839DB620DB6</td>
<td>leaf</td>
<td>client</td>
</tr>should be:
<tr mist-component="DummyComponent" mist-id="9758DFBB-2687-4089-AEB5-D839DB620DB6">
<td>9758DFBB-2687-4089-AEB5-D839DB620DB6</td>
<td>leaf</td>
<td>client</td>
</tr>Additional notes
No response
qericdev
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working