templ-go / templ-jetbrains

Intellij language support for templ
MIT License
71 stars 11 forks source link

feature: Fix HTML strings pasted in templ context #12

Closed peteraba closed 7 months ago

peteraba commented 10 months ago

It'd be great if the extension could replace <br> tags with <br /> when pasting in text. Sometimes I paste in HTML containing SVGs and what not, so it becomes harder to spot broken tags.

bastianwegge commented 7 months ago

Just fyi: We started a discussion in https://github.com/a-h/templ/issues/637 concerning the so-called "void" tags.

joerdav commented 7 months ago

Good point, I'll close this in favour of tracking this in https://github.com/a-h/templ/issues/637

peteraba commented 7 months ago

@bastianwegge Obviously, if the changes proposed in https://github.com/a-h/templ/issues/637 were to be implemented, this suggestion would make little sense.

@joerdav you're marking this as complete, but is it?

joerdav commented 7 months ago

Sorry, I tend to just use the close button, then comment with my reasoning, I've updated the status.

peteraba commented 7 months ago

@joerdav fair enough. thank you so much for the effort and the plugin itself! :pray:

a-h commented 6 months ago

@peteraba - there's a fix up for good elements in the main branch of templ now. templ fmt now will auto update <br> to <br/>. If you had time to test it with your SVG use case, that would be appreciated.

Alternatively, drop a code sample, and I'll make sure it isn't damaged by the update.