Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ampproject/amphtml
/ cleanWhitespace
Function
cleanWhitespace
testing/helpers/cleanHtml.ts:18–20 ·
view source on GitHub ↗
(html: string)
Source
from the content-addressed store, hash-verified
16
}
17
18
export
function
cleanWhitespace(html: string): string {
19
return
html.trim().replace(/\s\s+/g,
' '
);
20
}
Callers
1
cleanHtml
Function · 0.85
Calls
1
replace
Method · 0.45
Tested by
no test coverage detected