Skip to main content

InlineCodeHandler

Trait InlineCodeHandler 

Source
pub trait InlineCodeHandler: Send + Sync {
    // Required method
    fn render(&self, code: &str) -> Option<String>;
}
Expand description

A handler for rendering inline code spans.

This allows customizing how inline code is rendered, for example to transform r[rule.id] references into clickable links.

Required Methods§

Source

fn render(&self, code: &str) -> Option<String>

Render an inline code span to HTML.

§Arguments
  • code - The code content (without backticks)
§Returns

The rendered HTML string. Return None to use the default rendering.

Implementors§