( htmlAstWithErrors: ParseTreeResult, preserveSignificantWhitespace: boolean, )
| 325 | } |
| 326 | |
| 327 | export function removeWhitespaces( |
| 328 | htmlAstWithErrors: ParseTreeResult, |
| 329 | preserveSignificantWhitespace: boolean, |
| 330 | ): ParseTreeResult { |
| 331 | return new ParseTreeResult( |
| 332 | visitAllWithSiblings( |
| 333 | new WhitespaceVisitor(preserveSignificantWhitespace), |
| 334 | htmlAstWithErrors.rootNodes, |
| 335 | ), |
| 336 | htmlAstWithErrors.errors, |
| 337 | ); |
| 338 | } |
| 339 | |
| 340 | interface SiblingVisitorContext { |
| 341 | prev: html.Node | undefined; |
no test coverage detected
searching dependent graphs…