denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.78k stars 5.22k forks source link

Formatting tagged template literals #19840

Open cyruseuros opened 1 year ago

cyruseuros commented 1 year ago

A lot of modern frontend (often web-component-based) frameworks make use of JS/TS tagged template literals for inline html/css. To the point where most editors (and even GitHub) recognize it and apply syntax highlighting:

html`<div>foo</div>`.css`:root { --primary: #000 }`

Would it be possible for deno fmt to take these into consideration just like Prettier does and as Deno itself does for markdown code snippets?

bartlomieju commented 1 year ago

@dsherret any thoughts here?