Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 05ee34e

Browse files
Merge pull request #304 from epage/docs
docs(renderer): Link out styles to where used
2 parents 984f01a + dd2169c commit 05ee34e

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

‎src/renderer/mod.rs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,71 +176,72 @@ impl Renderer {
176176

177177
/// Customize [`Renderer::styled`]
178178
impl Renderer {
179-
/// Override the output style for `error`
179+
/// Override the output style for [error][crate::Level::ERROR]
180180
pub const fn error(mut self, style: Style) -> Self {
181181
self.stylesheet.error = style;
182182
self
183183
}
184184

185-
/// Override the output style for `warning`
185+
/// Override the output style for [warnings][crate::Level::WARNING]
186186
pub const fn warning(mut self, style: Style) -> Self {
187187
self.stylesheet.warning = style;
188188
self
189189
}
190190

191-
/// Override the output style for `info`
191+
/// Override the output style for [info][crate::Level::INFO]
192192
pub const fn info(mut self, style: Style) -> Self {
193193
self.stylesheet.info = style;
194194
self
195195
}
196196

197-
/// Override the output style for `note`
197+
/// Override the output style for [notes][crate::Level::NOTE]
198198
pub const fn note(mut self, style: Style) -> Self {
199199
self.stylesheet.note = style;
200200
self
201201
}
202202

203-
/// Override the output style for `help`
203+
/// Override the output style for [help][crate::Level::HELP]
204204
pub const fn help(mut self, style: Style) -> Self {
205205
self.stylesheet.help = style;
206206
self
207207
}
208208

209-
/// Override the output style for line numbers
209+
/// Override the output style for line numbers in the [`Snippet`][crate::Snippet] gutter
210210
pub const fn line_num(mut self, style: Style) -> Self {
211211
self.stylesheet.line_num = style;
212212
self
213213
}
214214

215-
/// Override the output style for emphasis
215+
/// Override the output style for emphasis for the
216+
/// [`primary_title`][crate::Level::primary_title]
216217
pub const fn emphasis(mut self, style: Style) -> Self {
217218
self.stylesheet.emphasis = style;
218219
self
219220
}
220221

221-
/// Override the output style for none
222-
pub const fn none(mut self, style: Style) -> Self {
223-
self.stylesheet.none = style;
224-
self
225-
}
226-
227222
/// Override the output style for [`AnnotationKind::Context`][crate::AnnotationKind::Context]
228223
pub const fn context(mut self, style: Style) -> Self {
229224
self.stylesheet.context = style;
230225
self
231226
}
232227

233-
/// Override the output style for additions
228+
/// Override the output style for [`Patch`][crate::Patch] additions
234229
pub const fn addition(mut self, style: Style) -> Self {
235230
self.stylesheet.addition = style;
236231
self
237232
}
238233

239-
/// Override the output style for removals
234+
/// Override the output style for [`Patch`][crate::Patch] removals
240235
pub const fn removal(mut self, style: Style) -> Self {
241236
self.stylesheet.removal = style;
242237
self
243238
}
239+
240+
/// Override the output style for all other text
241+
pub const fn none(mut self, style: Style) -> Self {
242+
self.stylesheet.none = style;
243+
self
244+
}
244245
}
245246

246247
/// The character set for rendering for decor

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /