MCPcopy Create free account
hub / github.com/M66B/FairEmail / head

Method head

app/src/main/java/eu/faircode/email/HtmlHelper.java:507–520  ·  view source on GitHub ↗
(Node node, int depth)

Source from the content-addressed store, hash-verified

505 private boolean remove = false;
506
507 @Override
508 public FilterResult head(Node node, int depth) {
509 if (node instanceof Comment) {
510 String data = ((Comment) node).getData().trim();
511 if (data.startsWith("[if") && !data.endsWith("endif]")) {
512 remove = true;
513 return FilterResult.REMOVE;
514 } else if (remove && data.endsWith("endif]")) {
515 remove = false;
516 return FilterResult.REMOVE;
517 }
518 }
519 return (remove ? FilterResult.REMOVE : FilterResult.CONTINUE);
520 }
521
522 @Override
523 public FilterResult tail(Node node, int depth) {

Callers 9

onExecuteMethod · 0.45
sanitizeMethod · 0.45
setViewportMethod · 0.45
hasColorSchemeMethod · 0.45
fakeDarkMethod · 0.45
toHtmlMethod · 0.45
onExecuteMethod · 0.45
parseFaviconMethod · 0.45
onExecuteMethod · 0.45

Calls 15

eMethod · 0.95
iMethod · 0.95
guessSchemeMethod · 0.95
mergeStylesMethod · 0.95
encodeWebColorMethod · 0.95
normalizeTextMethod · 0.95
trimMethod · 0.80
charAtMethod · 0.80
indexOfMethod · 0.80
getDataMethod · 0.45
lengthMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected