Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ListItem

OfficeIMO.Markdown

Namespace
OfficeIMO.Markdown
Assembly
OfficeIMO.Markdown
Source revision
0eef6a5756b9 with working tree changes
Implements
IChildMarkdownBlockContainer ISyntaxChildrenMarkdownBlock IOwnedSyntaxChildrenMarkdownBlock
Modifiers
sealed

List item content; supports plain and task (checklist) items.

Inheritance

Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 1

Constructors

public ListItem(InlineSequence content) #

Creates a plain list item.

Parameters

content OfficeIMO.Markdown.InlineSequence required

Methods

public static ListItem Task(string text, bool done = false) #

Creates a task (checklist) item.

Parameters

text string required
done bool = false optional

Returns

ListItem
public static ListItem TaskInlines(InlineSequence content, bool done = false) #

Creates a task (checklist) item using inline content.

Parameters

content OfficeIMO.Markdown.InlineSequence required
Inline content for the list item. When null, an empty sequence is used.
done bool = false optional
Whether the task should be marked as completed.

Returns

ListItem
public static ListItem Text(string text) #

Creates a plain text item.

Parameters

text string required

Returns

ListItem

Properties

public InlineSequence Content { get; } #

Inlines representing item content.

public List<InlineSequence> AdditionalParagraphs { get; } #

Additional paragraphs inside the list item (multi-paragraph list items).

public IReadOnlyList<ParagraphBlock> ParagraphBlocks { get; } #

MarkdownParagraph blocks owned by this list item. This exposes list-item paragraph content as blocks for AST-style consumers.

public List<IMarkdownBlock> NestedBlocks { get; } #

Nested block content inside the list item (e.g., nested ordered/unordered lists, code blocks).

public IReadOnlyList<IMarkdownBlock> ChildBlocks { get; } #

Ordered AST-style view of all list-item child blocks, including lead paragraphs.

public bool IsTask { get; } #

True when rendered as a task item (- [ ] or - [x]).

public bool Checked { get; } #

Whether the task is checked.

public MarkdownSourceSpan? MarkerSourceSpan { get; internal set; } #

Source span of the list marker token (-, *, +, 1., or 1)) when parsed from markdown.

public string? MarkerText { get; internal set; } #

Exact list marker token (-, *, +, 1., or 1)) when parsed from markdown.

public MarkdownSourceSpan? TaskMarkerSourceSpan { get; internal set; } #

Source span of the task marker token ([ ], [x], or [X]) when parsed from markdown.

public string? TaskMarkerText { get; internal set; } #

Exact task marker token ([ ], [x], or [X]) when parsed from markdown.

public int Level { get; set; } #

Indentation level (0 = top-level). Used for nested lists.

public bool ForceLoose { get; set; } #

Forces paragraph-wrapped loose rendering even when only the first paragraph and child blocks exist.