Skip to main content

Module early_returns

Module early_returns 

Source
Expand description

Fast-path checks and early return utilities for rule implementations in rumdl. Provides helpers to quickly skip rules based on content analysis.

Structs§

ContentAnalysis
Comprehensive content analysis for rule filtering

Traits§

EarlyReturns
Trait for implementing early returns in rules

Functions§

has_blockquotes
Check if content has any blockquotes
has_code
Check if content has any code blocks or inline code
has_emphasis
Check if content has any emphasis markers
has_hard_tabs
Check if content has hard tabs
has_headings
Check if content has any headings (ATX or Setext)
has_html
Check if content has any HTML tags
has_links_or_images
Check if content has any links or images
has_lists
Check if content has any list markers
has_long_lines
Check if content has long lines (over threshold)
has_ordered_lists
Check if content has ordered lists
has_setext_headings
Check if content has Setext headings (underlines)
has_tables
Check if content has any tables
has_trailing_spaces
Check if content has trailing spaces
has_urls
Early return utilities for performance optimization These functions provide fast content analysis to skip expensive processing Check if content has any URLs (http, https, ftp)
should_skip_blockquote_rule
Common early return checks for blockquote-related rules
should_skip_code_block_rule
Common early return checks for code block related rules
should_skip_emphasis_rule
Common early return checks for emphasis-related rules
should_skip_heading_rule
Common early return checks for heading-related rules
should_skip_html_rule
Common early return checks for inline HTML rules
should_skip_image_rule
Common early return checks for image-related rules
should_skip_link_rule
Common early return checks for link-related rules
should_skip_list_rule
Common early return checks for list-related rules
should_skip_whitespace_rule
Common early return checks for whitespace-related rules