pub struct CodeGroup { /* private fields */ }Expand description
Render ::: code-group containers as tabbed code panels.
Implementations§
Source§impl CodeGroup
impl CodeGroup
Sourcepub fn with_options(opts: CodeGroupOptions) -> Self
pub fn with_options(opts: CodeGroupOptions) -> Self
A code-group extension with caller-chosen class names.
Trait Implementations§
Source§impl CarveExtension for CodeGroup
impl CarveExtension for CodeGroup
Source§fn before_render(
&self,
doc: Document,
_ctx: &BeforeRenderContext<'_>,
) -> Document
fn before_render( &self, doc: Document, _ctx: &BeforeRenderContext<'_>, ) -> Document
beforeRender transform. Receives a BeforeRenderContext carrying the
render Options AND the effective Mode for the actual target
format. An extension that emits its final HTML here (the carve-rs
transform model for FencedRender / MathBlock) branches on
ctx.mode() / ctx.is_static() and consults ctx.options.renderers. Read moreSource§fn render_extension_carrier(
&self,
node: &ExtensionCarrier,
ctx: &RenderContext<'_>,
) -> Option<String>
fn render_extension_carrier( &self, node: &ExtensionCarrier, ctx: &RenderContext<'_>, ) -> Option<String>
Render a block carrier left by a render-stage transform.
Source§fn semantic_span_names(&self) -> &'static [&'static str]
fn semantic_span_names(&self) -> &'static [&'static str]
Semantic span attribute names this extension adds (spec PART 9 §10). Read more
Source§fn diagram_key(&self) -> Option<&str>
fn diagram_key(&self) -> Option<&str>
The
StaticRenderers::diagram key this extension is consulted under,
when it has one. None for everything that is not a fenced-render
preset. Read moreSource§fn match_inline(
&self,
_text: &str,
_pos: usize,
_ctx: &MatcherContext<'_>,
) -> Option<InlineMatch>
fn match_inline( &self, _text: &str, _pos: usize, _ctx: &MatcherContext<'_>, ) -> Option<InlineMatch>
Match an inline construct beginning at
pos in text.Source§fn match_block(
&self,
_lines: &[&str],
_start: usize,
_ctx: &MatcherContext<'_>,
) -> Option<BlockMatch>
fn match_block( &self, _lines: &[&str], _start: usize, _ctx: &MatcherContext<'_>, ) -> Option<BlockMatch>
Match a block construct beginning at
start in lines.Source§fn after_parse(&self, doc: Document) -> Document
fn after_parse(&self, doc: Document) -> Document
Rewrite the parsed document before render preparation.
Source§fn render_inline_extension(
&self,
_node: &InlineExtension,
_ctx: &RenderContext<'_>,
) -> Option<String>
fn render_inline_extension( &self, _node: &InlineExtension, _ctx: &RenderContext<'_>, ) -> Option<String>
Render an inline extension node as HTML, if this extension owns it.
Source§fn carrier_anchored_at_column_zero(&self, _node: &ExtensionCarrier) -> bool
fn carrier_anchored_at_column_zero(&self, _node: &ExtensionCarrier) -> bool
Does this extension’s carrier anchor its element at column 0 whatever the
nesting, rather than at the ambient block indentation? Read more
Auto Trait Implementations§
impl !Freeze for CodeGroup
impl !RefUnwindSafe for CodeGroup
impl !Sync for CodeGroup
impl Forget for CodeGroup
impl Move for CodeGroup
impl Send for CodeGroup
impl Unpin for CodeGroup
impl UnsafeUnpin for CodeGroup
impl UnwindSafe for CodeGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more