Open nberlette opened 1 day ago
Here is the code in copy & paste-able form for whoever is going to tackle this issue.
<div class="icon">
<svg
xmlns="http://www.w3.org/2000/svg"
{width}
{height}
viewBox="-0.5 -1 32 32"
aria-hidden={true}
{fill}
class="drop-shadow-lg filter {$$restProps.class || ''}"
>
{#if title}
<title>{title}</title>
{/if}
</svg>
</div>
@marvinhagemeister Oof, I was in such a rush earlier when I opened this and I didn't realize I failed to include anything aside from 2 screenshots and a superficial description. That's embarrassing 😬
Thanks for picking up the slack for me, Marvin! Much appreciated.
Also, I was digging around tonight trying to figure this thing out.... I'm fairly confident now that the problem is not in Deno itself; it more than likely stems from the dprint markup_fmt
plugin responsible for formatting svelte/vue/astro files. Would it be better if I took this issue to the dprint
repo instead?
cc: @g-plane maybe you'd be able to shed some light on what's causing this?
Edit: @marvinhagemeister was kind enough to transcribe my original lazy screenshot into a bona-fide code snippet below. I've updated the OP to include this snippet for visibility. I've also replaced the screenshot of the error encountered with the output text from my terminal, and updated some of the wording to make things a bit easier to understand.
More specifically, the problem lies in that last line in the opening tag:
While the code above is ugly, it is 100% valid syntax in the svelte language. But it causes the formatter to throw this error:
It appears that using template expressions inside of double quotes is not compatible with Deno's new markup formatter. As soon as I remove that template expression (or nuke the whole className it resides in), everything works just as one would expect. Notice that despite the failed formatting attempt, Deno moves on to other files and simply skips the one with the syntax it can't understand.