Skip to main content

Module render

Module render 

Source
Expand description

Rendering: solar AST -> vocs MDX.

Structsยง

CommentData ๐Ÿ”’
Ctx ๐Ÿ”’
Description ๐Ÿ”’
Links ๐Ÿ”’
The link environment for one page, including its local member anchors.

Enumsยง

DescKind ๐Ÿ”’

Functionsยง

collect_comments ๐Ÿ”’
Collect natspec from doc comments, applying inline link replacement.
dedent ๐Ÿ”’
Strip common leading whitespace from all non-empty lines.
escape_table_cell ๐Ÿ”’
Escape a value so it is safe inside a markdown (GFM) table cell:
fence_marker ๐Ÿ”’
fenced_description_regions ๐Ÿ”’
Complete fenced code blocks that are direct children of the description document. Restricting preservation to root-level blocks keeps list, quote, table, and unclosed-fence behavior on the conservative escaping path.
find_contract_id ๐Ÿ”’
Find the HIR ContractId for a contract by name, requiring the contract to live in the source file currently being rendered (compared via absolute path) so contracts that share a file stem across src/ and lib/ cannot collide.
first_notice ๐Ÿ”’
function_heading ๐Ÿ”’
function_signature_anchor ๐Ÿ”’
has_inheritdoc ๐Ÿ”’
has_local_natspec ๐Ÿ”’
Returns the base contract name from @inheritdoc Base, or None. Whether the declaration carries any local NatSpec item other than @inheritdoc. Solidity only auto-inherits documentation for a member with none, so implicit inheritance is gated on this being false; a local @custom:*, @title or @author counts as local documentation just like @notice/@dev/@param/@return.
is_complete_fence ๐Ÿ”’
is_known_custom_tag ๐Ÿ”’
Returns true if tag looks like a generally-recognised natspec custom tag.
italicize_dev ๐Ÿ”’
Italicize a @dev block by wrapping it in <i>...</i> HTML tags. Surrounding blank lines around the tags ensure MDX/CommonMark parses the inner content as block-level markdown (lists, code fences, multiple paragraphs all work).
neutralize_fence_markers ๐Ÿ”’
Keep rejected or incomplete fence markers from changing the Markdown context of subsequent descriptions. Entities render as the original marker characters without acting as syntax.
render_constants ๐Ÿ”’
render_contract ๐Ÿ”’
render_free_functions ๐Ÿ”’
render_function_section ๐Ÿ”’
replace_description_links ๐Ÿ”’
Replace inline links in a standalone notice or dev description while preserving complete, top-level fenced code blocks. Other NatSpec fields use replace_inline_links directly because their rendering context (notably table cells) cannot contain block-level Markdown.
return_description ๐Ÿ”’
sanitize_description_prose ๐Ÿ”’
source
Render a single Solidity source file as a list of (relative_output_path, mdx_content) pairs.
strip_one_ws ๐Ÿ”’
write_code_block ๐Ÿ”’
write_comment_block ๐Ÿ”’
write_deployments_table ๐Ÿ”’
Write the Deployments table for a contract page.
write_enum_variants_table ๐Ÿ”’
write_frontmatter ๐Ÿ”’
write_getter_table ๐Ÿ”’
Render a getter signature table (Parameters or Returns) from its inherited rows.
write_git_source ๐Ÿ”’
Write link if git_url is set.
write_item_body ๐Ÿ”’
Render the common body of a struct, enum, event, error, or value type.
write_page_header ๐Ÿ”’
write_param_table ๐Ÿ”’
write_signature_table_header ๐Ÿ”’
Common layout for parameters, returns, and struct properties.
write_struct_properties_table ๐Ÿ”’
yaml_escape_double_quoted ๐Ÿ”’
Escape a string for use as a YAML double-quoted scalar.