vscode-blade-formatter
vscode-blade-formatter copied to clipboard
[Formatting Bug]: Raw html on js variable with backtick keep adding new indent
Platform
Windows
Template before formatting
let formHTML = `
<select id="status_select" class="swal2-select" style="display: flex; margin:10px 0; width:100%">
<option value="">- Pilih Status -</value>
<option value="1" ${btn_status===1 ? 'selected' : ''}>Aktif</value>
<option value="2" ${btn_status===2 ? 'selected' : ''}>Pending</value>
<option value="0" ${btn_status===0 ? 'selected' : ''}>Nonaktif</value>
</select>
<textarea id="status_note" type="text" class="swal2-textarea" style="display: flex; margin:0; width:100%;" placeholder="Tuliskan alasan...">
${btn_note}
</textarea>
`;
Template after formatting
let formHTML = `
<select id="status_select" class="swal2-select" style="display: flex; margin:10px 0; width:100%">
<option value="">- Pilih Status -</value>
<option value="1" ${btn_status===1 ? 'selected' : ''}>Aktif</value>
<option value="2" ${btn_status===2 ? 'selected' : ''}>Pending</value>
<option value="0" ${btn_status===0 ? 'selected' : ''}>Nonaktif</value>
</select>
<textarea id="status_note" type="text" class="swal2-textarea" style="display: flex; margin:0; width:100%;" placeholder="Tuliskan alasan...">
${btn_note}
</textarea>
`;
Expected Behaviour
It keeps indenting the line everytime I format. Especially when I'm turning on "formatOnSave".
It should be stick like this instead of add more indent...
Relevant log output
No response
@ExRazor I could not reproduce this behaviour sorry. Can you provide entire template? It might be replated to other part of template.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days