Skip to content

Commit 88072d6

Browse files
committed
docs: Provide an example of multiple groups
1 parent da5100c commit 88072d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/snippet.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ pub(crate) struct Id<'a> {
2222
/// A [diagnostic][crate::Renderer::render] is made of several `Group`s.
2323
/// `Group`s are used to [annotate][AnnotationKind::Primary] [`Snippet`]s
2424
/// with different [semantic reasons][Title].
25+
///
26+
/// # Example
27+
///
28+
/// ```rust
29+
#[doc = include_str!("../examples/highlight_message.rs")]
30+
/// ```
31+
#[doc = include_str!("../examples/highlight_message.svg")]
2532
#[derive(Clone, Debug)]
2633
pub struct Group<'a> {
2734
pub(crate) primary_level: Level<'a>,

0 commit comments

Comments
 (0)