Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bba974b

Browse files
committed
docs(renderer): Link out styles to where used
1 parent d06dcd4 commit bba974b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/renderer/mod.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,49 +176,50 @@ 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+
/// Override the output style for all other text
222223
pub const fn none(mut self, style: Style) -> Self {
223224
self.stylesheet.none = style;
224225
self
@@ -230,13 +231,13 @@ impl Renderer {
230231
self
231232
}
232233

233-
/// Override the output style for additions
234+
/// Override the output style for [`Patch`][crate::Patch] additions
234235
pub const fn addition(mut self, style: Style) -> Self {
235236
self.stylesheet.addition = style;
236237
self
237238
}
238239

239-
/// Override the output style for removals
240+
/// Override the output style for [`Patch`][crate::Patch] removals
240241
pub const fn removal(mut self, style: Style) -> Self {
241242
self.stylesheet.removal = style;
242243
self

0 commit comments

Comments
 (0)