diff options
author | Sebastian Wiesner <sebastian@swsnr.de> | 2019-07-30 20:14:42 +0200 |
---|---|---|
committer | Sebastian Wiesner <sebastian@swsnr.de> | 2019-07-30 20:14:42 +0200 |
commit | f0b5fd080fb99d9a37a195758bb75994e788c815 (patch) | |
tree | 6f696533ecfa8b67087e26642cd1f0c25a95d4f9 /src | |
parent | 2adc7c3e0ce63618ffae67e386eaf65f4bb4e172 (diff) |
Fix compiler errors
New version promoted Code to an event
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -476,6 +476,10 @@ fn write_event<'io, 'c, 'l, W: Write>( ctx.newline_and_indent()?; Ok(ctx) } + Code(code) => { + ctx.write_highlighted(code)?; + Ok(ctx) + } Text(text) => { // When we wrote an inline image suppress the text output, ie, the // image title. We do not need it if we can show the image on the @@ -598,10 +602,6 @@ fn start_tag<'io, 'c, 'l, W: Write>( let style = ctx.style.current.bold(); ctx.set_style(style) } - Code => { - let style = ctx.style.current.fg(Colour::Yellow); - ctx.set_style(style) - } Link(_, destination, _) => { // Do nothing if the terminal doesn’t support inline links of if `destination` is no // valid URL: We will write a reference link when closing the link tag. @@ -717,7 +717,7 @@ fn end_tag<'io, 'c, 'l, W: Write>( ctx.drop_style(); ctx.style.emphasis_level -= 1; } - Strong | Code => ctx.drop_style(), + Strong => ctx.drop_style(), Link(_, destination, title) => { if ctx.links.inside_inline_link { match ctx.output.capabilities.links { |