class YouTubeLinkNodePostProcessor extends NodePostProcessor {

    public YouTubeLinkNodePostProcessor(DataHolder options) {
    }

    @Override
    public void process(@NotNull NodeTracker state, @NotNull Node node) {<FILL_FUNCTION_BODY>}

    public static class Factory extends NodePostProcessorFactory {
        public Factory(DataHolder options) {
            super(false);

            addNodes(Link.class);
        }

        @NotNull
        @Override
        public NodePostProcessor apply(@NotNull Document document) {
            return new YouTubeLinkNodePostProcessor(document);
        }
    }
}

        if (node instanceof Link) {
            Node previous = node.getPrevious();

            if (previous instanceof Text) {
                BasedSequence chars = previous.getChars();
                if (chars.endsWith("@") && chars.isContinuedBy(node.getChars())) {
                    int prevBackslash = chars.subSequence(0, chars.length() - 1).countTrailing(CharPredicate.BACKSLASH);
                    if ((prevBackslash & 1) == 0) {
                        // trim previous chars to remove '@'
                        previous.setChars(chars.subSequence(0, chars.length() - 1));

                        YouTubeLink youTubeLink = new YouTubeLink((Link) node);
                        youTubeLink.takeChildren(node);
                        node.unlink();
                        previous.insertAfter(youTubeLink);
                        state.nodeRemoved(node);
                        state.nodeAddedWithChildren(youTubeLink);
                    }
                }
            }
        }
    
<methods>public non-sealed void <init>() ,public final @NotNull Document processDocument(@NotNull Document) <variables>