Class TocUtils


  • public class TocUtils
    extends Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.vladsch.flexmark.html.renderer.AttributablePart TOC_CONTENT  
      static com.vladsch.flexmark.html.renderer.AttributablePart TOC_LIST  
    • Constructor Summary

      Constructors 
      Constructor Description
      TocUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static List<com.vladsch.flexmark.ast.Heading> filteredHeadings​(List<com.vladsch.flexmark.ast.Heading> headings, com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)  
      static String getSimTocPrefix​(com.vladsch.flexmark.ext.toc.internal.TocOptions options, com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions)  
      static String getTocPrefix​(com.vladsch.flexmark.ext.toc.internal.TocOptions options, com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions)  
      static com.vladsch.flexmark.util.misc.Paired<List<com.vladsch.flexmark.ast.Heading>,​List<String>> htmlHeadingTexts​(com.vladsch.flexmark.html.renderer.NodeRendererContext context, List<com.vladsch.flexmark.ast.Heading> headings, com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)  
      static com.vladsch.flexmark.util.misc.Pair<List<com.vladsch.flexmark.ast.Heading>,​List<String>> markdownHeaderTexts​(List<com.vladsch.flexmark.ast.Heading> headings, com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)  
      static void renderHtmlToc​(com.vladsch.flexmark.html.HtmlWriter out, com.vladsch.flexmark.util.sequence.BasedSequence sourceText, List<Integer> headings, List<String> headingTexts, List<String> headingRefIds, com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)  
      static void renderMarkdownToc​(com.vladsch.flexmark.formatter.MarkdownWriter out, List<Integer> headings, List<String> headingTexts, com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)  
      static void renderTocContent​(com.vladsch.flexmark.formatter.MarkdownWriter markdown, com.vladsch.flexmark.ext.toc.internal.TocOptions options, com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions, List<com.vladsch.flexmark.ast.Heading> headings, List<String> headingTexts)  
    • Field Detail

      • TOC_CONTENT

        public static final com.vladsch.flexmark.html.renderer.AttributablePart TOC_CONTENT
      • TOC_LIST

        public static final com.vladsch.flexmark.html.renderer.AttributablePart TOC_LIST
    • Constructor Detail

      • TocUtils

        public TocUtils()
    • Method Detail

      • getTocPrefix

        public static String getTocPrefix​(com.vladsch.flexmark.ext.toc.internal.TocOptions options,
                                          com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions)
      • getSimTocPrefix

        public static String getSimTocPrefix​(com.vladsch.flexmark.ext.toc.internal.TocOptions options,
                                             com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions)
      • renderTocContent

        public static void renderTocContent​(com.vladsch.flexmark.formatter.MarkdownWriter markdown,
                                            com.vladsch.flexmark.ext.toc.internal.TocOptions options,
                                            com.vladsch.flexmark.ext.toc.internal.TocOptions defaultOptions,
                                            List<com.vladsch.flexmark.ast.Heading> headings,
                                            List<String> headingTexts)
      • renderHtmlToc

        public static void renderHtmlToc​(com.vladsch.flexmark.html.HtmlWriter out,
                                         com.vladsch.flexmark.util.sequence.BasedSequence sourceText,
                                         List<Integer> headings,
                                         List<String> headingTexts,
                                         List<String> headingRefIds,
                                         com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)
      • filteredHeadings

        public static List<com.vladsch.flexmark.ast.Heading> filteredHeadings​(List<com.vladsch.flexmark.ast.Heading> headings,
                                                                              com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)
      • htmlHeadingTexts

        public static com.vladsch.flexmark.util.misc.Paired<List<com.vladsch.flexmark.ast.Heading>,​List<String>> htmlHeadingTexts​(com.vladsch.flexmark.html.renderer.NodeRendererContext context,
                                                                                                                                        List<com.vladsch.flexmark.ast.Heading> headings,
                                                                                                                                        com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)
      • markdownHeaderTexts

        public static com.vladsch.flexmark.util.misc.Pair<List<com.vladsch.flexmark.ast.Heading>,​List<String>> markdownHeaderTexts​(List<com.vladsch.flexmark.ast.Heading> headings,
                                                                                                                                         com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)
      • renderMarkdownToc

        public static void renderMarkdownToc​(com.vladsch.flexmark.formatter.MarkdownWriter out,
                                             List<Integer> headings,
                                             List<String> headingTexts,
                                             com.vladsch.flexmark.ext.toc.internal.TocOptions tocOptions)