MCPcopy Create free account
hub / github.com/angular/angular / removeWhitespaces

Function removeWhitespaces

packages/compiler/src/ml_parser/html_whitespaces.ts:278–289  ·  view source on GitHub ↗
(
  htmlAstWithErrors: ParseTreeResult,
  preserveSignificantWhitespace: boolean,
)

Source from the content-addressed store, hash-verified

276}
277
278export function removeWhitespaces(
279 htmlAstWithErrors: ParseTreeResult,
280 preserveSignificantWhitespace: boolean,
281): ParseTreeResult {
282 return new ParseTreeResult(
283 visitAllWithSiblings(
284 new WhitespaceVisitor(preserveSignificantWhitespace),
285 htmlAstWithErrors.rootNodes,
286 ),
287 htmlAstWithErrors.errors,
288 );
289}
290
291interface SiblingVisitorContext {
292 prev: html.Node | undefined;

Callers 1

parseAndRemoveWSFunction · 0.90

Calls 1

visitAllWithSiblingsFunction · 0.85

Tested by

no test coverage detected