void (boolean unknownAfter) { int containerStart = container.getTextRange().getStartOffset(); List<TextContent> components = new ArrayList<>(group.size()); for (int i = 0; i < group.size(); i++) { PsiElement e = group.get(i); TextContent component = extractRange(fullContent.getValue(), e.getTextRange().shiftLeft(containerStart)); if (markupIndices.contains(i)) { component = component.excludeRanges(List.of(new Exclusion(0, 0, ExclusionKind.markup))); } if (markupIndices.contains(i + 1)) { component = component.excludeRanges(List.of(new Exclusion(component.length(), component.length(), ExclusionKind.markup))); } components.add(component); } TextContent content = TextContent.join(components); if (content != null) { if (unknownBefore) content = content.markUnknown(TextRange.from(0, 0)); if (unknownAfter) content = content.markUnknown(TextRange.from(content.length(), 0)); content = HtmlUtilsKt.nbspToSpace(content.removeIndents(Set.of(' ', '\t'))); if (content != null) { for (PsiElement e : group) { result.put(e, content); } } } group.clear(); }