Skip to content

Commit 4c13fbb

Browse files
committed
docs: More accuratly describe AnnotationKind variants
1 parent c195b83 commit 4c13fbb

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/snippet.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,20 @@ impl<'a> Annotation<'a> {
262262
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
263263
#[non_exhaustive]
264264
pub enum AnnotationKind {
265-
/// Color to the [`Level`] the first [`Title`] in [`Group`]. If no [`Title`]
266-
/// is present, it will default to `error`.
265+
/// An [`Annotation`] which will use the "primary" underline character ('^'
266+
/// for [`OutputTheme::Ascii`], and '━' for [`OutputTheme::Unicode`]) and
267+
/// be colored according to the primary [`Level`] of the [`Group`].
268+
///
269+
/// [`OutputTheme::Ascii`]: crate::renderer::OutputTheme
270+
/// [`OutputTheme::Unicode`]: crate::renderer::OutputTheme
267271
Primary,
268-
/// "secondary"; fixed color
272+
/// An [`Annotation`] which will use the "secondary" underline character (
273+
/// '-' for [`OutputTheme::Ascii`], and '─' for [`OutputTheme::Unicode`])
274+
/// and be colored according to [`Renderer::context`].
275+
///
276+
/// [`Renderer::context`]: crate::renderer::Renderer
277+
/// [`OutputTheme::Ascii`]: crate::renderer::OutputTheme
278+
/// [`OutputTheme::Unicode`]: crate::renderer::OutputTheme
269279
Context,
270280
}
271281

0 commit comments

Comments
 (0)