parse5 icon indicating copy to clipboard operation
parse5 copied to clipboard

Retain Attribute Spacing

Open ackava opened this issue 1 year ago • 1 comments

https://astexplorer.net/#/gist/033016ca9df38fea6ac05b61a474df63/74f7e3fff5a4f3771383394151c4a36454399f92

Is there anyway to retain attribute spacing? Check a attribute in h1.

Text Nodes contain whitespaces and whitespace can retain correctly.

I know attribute doesn't have prefix/suffix whitespaces in the HTML spec, but it would be of great help to retain space for WYSWYG editors.

When there are multiple attributes specified, we usually indent them one after another.

ackava avatar Oct 17 '24 06:10 ackava