SectionBlocks
Ecng.Markdown.Extensions
Helpers shared by the built-in ::: sections and the ones a host registers through ISectionBlock).
Methoden
GetText
public static string GetText(ContainerInline container)
result = SectionBlocks.GetText(container)
Flattens an inline tree to plain text, keeping the authored line breaks and the tokens of the placeholders (counters, entity references, diagrams) that are resolved after rendering.
- container
- The inline tree.
Rückgabe: The text.
HasArgument
public static bool HasArgument(CustomContainer block, string name)
result = SectionBlocks.HasArgument(block, name)
Tells whether the container's arguments (the words after its name) include the given one.
- block
- The container.
- name
- The argument to look for, compared case-insensitively.
Rückgabe: when the argument is present.
WriteOpenTag
public static void WriteOpenTag(HtmlRenderer renderer, string tag, MarkdownObject obj, string classes)
SectionBlocks.WriteOpenTag(renderer, tag, obj, classes)
Writes an opening tag carrying the given classes plus the author's {#id .class} attributes. Of the author's other properties only data-*, aria-*, role and title are written, so event handlers and inline styles never reach the page.
- renderer
- The HTML renderer.
- tag
- The element name.
- obj
- The markdown object whose attributes are written.
- classes
- The classes the section itself needs; may be empty.