You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
collapse-whitespace behaves perfectly for block PRE elements, such as the default <PRE> tag.
But there are use cases where users need preformatted behavior on inline elements. For example, GitLab's CSS for the <code> tag is set as white-space: pre-wrap;. The browser behavior is then as follows, but collapse-whitespace is not consistent with that.
<divclass="test"><code>four spaces</code></div><divclass="result"><code>four spaces</code></div><divclass="test">Space <code>no space</code> more space</div><divclass="result">Space <code>no space</code> more space</div><divclass="test">Space <code> leading code space</code> more space</div><divclass="result">Space <code> leading code space</code> more space</div><divclass="test">Space <code>trailing code space </code> more space</div><divclass="result">Space <code>trailing code space </code> more space</div><divclass="test">Space <code>trailing code space </code><b> more space in tag</b></div><divclass="result">Space <code>trailing code space </code><b> more space in tag</b></div><divclass="test">Space <code>trailing code space </code><b> more space after code and tag</b></div><divclass="result">Space <code>trailing code space </code><b>more space after code and tag</b></div><divclass="test"><b>Space before tag </b><code>my code</code></div><divclass="result"><b>Space before tag </b><code>my code</code></div><divclass="test"><b>Space before tag and code </b><code>my code</code></div><divclass="result"><b>Space before tag and code </b><code>my code</code></div>
The text was updated successfully, but these errors were encountered:
martincizek
added a commit
to orchitech/collapse-whitespace
that referenced
this issue
Mar 24, 2020
collapse-whitespace
behaves perfectly for block PRE elements, such as the default<PRE>
tag.But there are use cases where users need preformatted behavior on inline elements. For example, GitLab's CSS for the
<code>
tag is set aswhite-space: pre-wrap;
. The browser behavior is then as follows, butcollapse-whitespace
is not consistent with that.The text was updated successfully, but these errors were encountered: