-
-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Description
This is just a question as per the title. I am not sure if it should work.
example file with weird indentations:
$ templ fmt < ./siteexp.templ
package templates
script graph(data string) {
const chart = LightweightCharts.createChart(document.body, { width: 400, height: 300 });
const lineSeries = chart.addLineSeries();
lineSeries.setData(data);
if (true) {
console.log("yes");
} else {
console.log("no");
}
}
templ body() {
<script>
const chart = LightweightCharts.createChart(document.body, { width: 400, height: 300 });
const lineSeries = chart.addLineSeries();
lineSeries.setData([
{ time: '2019-04-11', value: 80.01 },
{ time: '2019-04-12', value: 96.63 },
{ time: '2019-04-13', value: 76.64 },
{ time: '2019-04-14', value: 81.89 },
{ time: '2019-04-15', value: 74.43 },
{ time: '2019-04-16', value: 80.01 },
{ time: '2019-04-17', value: 96.63 },
{ time: '2019-04-18', value: 76.64 },
{ time: '2019-04-19', value: 81.89 },
{ time: '2019-04-20', value: 74.43 },
]);
</script>
<body>
<div>
hello
</div>
</body>
}
The html 'body' section at the end does format, however nothing in either a 'script' block or tags gets formatted.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels