all repos — htmlformat @ 2478490ea63e212becc9efd74e17a2888d144e7d

Go package and CLI tool used to format HTML

fix spacing between text node and inline element

Alan Pearce
commit

2478490ea63e212becc9efd74e17a2888d144e7d

parent

09c40dba2914e2ee98debf136f9d159b45f38b15

1 file changed, 9 insertions(+), 0 deletions(-)

changed files
M format_test.goformat_test.go
@@ -86,6 +86,15 @@ </style>
`, }, { + name: "space after text node with punctuation is preserved", + input: `<p><a href="https://example.com">Link</a>. <a href="https://example.org">Another</a></p>`, + expected: `<p> + <a href="https://example.com">Link</a>. + <a href="https://example.org">Another</a> +</p> +`, + }, + { name: "spaces are not added around elements ending with punctuation", input: "<div><time>19:00</time>–<time>20:00</time></div>", expected: `<div>