brainbuz / form-diva

Form::Diva Form Elements Generator
3 stars 2 forks source link

Better HTML tags generation mechanism #16

Closed bbrtj closed 2 years ago

bbrtj commented 2 years ago

Resolves #10

With the new _build_html_tag method, there's no need to clear any whitespace anymore. This method will not generate extra spaces between attributes when some of the attributes are empty.

This way the module still tests correctly (after minor whitespace changes in strings), but it should no longer break on doubled spaces as explained in the issue. I implemented (reused) a test which makes sure extra spaces are preserved.

bbrtj commented 2 years ago

@brainbuz if you don't have any objections, I will merge this later today