Interface NodeFormatterContext

    • Method Detail

      • getMarkdown

        @NotNull
        MarkdownWriter getMarkdown()
        Returns:
        the HTML writer to use
      • render

        void render​(@NotNull
                    Node node)
        Render the specified node and its children using the configured renderers. This should be used to render child nodes; be careful not to pass the node that is being rendered, that would result in an endless loop.
        Specified by:
        render in interface LinkResolverContext
        Parameters:
        node - the node to render
      • renderChildren

        void renderChildren​(@NotNull
                            Node parent)
        Render the children of the node, used by custom renderers
        Specified by:
        renderChildren in interface LinkResolverContext
        Parameters:
        parent - node the children of which are to be rendered
      • getFormattingPhase

        @NotNull
        FormattingPhase getFormattingPhase()
        Returns:
        current rendering phase
      • delegateRender

        void delegateRender()
        pass node rendering to previously registered handler
      • getBlockQuoteLikePrefixPredicate

        @NotNull
        CharPredicate getBlockQuoteLikePrefixPredicate()
        Returns:
        predicate for prefix chars which compact like block quote prefix char
      • getBlockQuoteLikePrefixChars

        @NotNull
        BasedSequence getBlockQuoteLikePrefixChars()
        Returns:
        char sequence of all prefix chars which compact like block quote prefix char
      • getTrackedOffsets

        @NotNull
        TrackedOffsetList getTrackedOffsets()
        Returns:
        tracked offset list
      • isRestoreTrackedSpaces

        boolean isRestoreTrackedSpaces()
      • getTrackedSequence

        @NotNull
        BasedSequence getTrackedSequence()
        NOTE: parser can only use a contiguous sequence, not segmented. Therefore, the AST offsets and base sequence from AST nodes has always an index into sequence equal to the offset. This sequence is set to not BasedSequence.NULL when the format sequence used for tracked offsets is not contiguous and TrackedOffset.offset is an offset from this sequence and need to be converted to index into this sequence to be used as an offset into AST sequence for offset conversion
        Returns:
        original sequence used for tracked offsets.
      • nodesOfType

        @NotNull
        java.lang.Iterable<? extends Node> nodesOfType​(@NotNull
                                                       java.util.Collection<java.lang.Class<?>> classes)
      • reversedNodesOfType

        @NotNull
        java.lang.Iterable<? extends Node> reversedNodesOfType​(@NotNull
                                                               java.util.Collection<java.lang.Class<?>> classes)