Fix for update to new version of mdcat

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-07-09 21:28:29 +02:00
parent be0436064c
commit 8bf6e66d41
2 changed files with 4 additions and 5 deletions

View file

@ -33,7 +33,7 @@ libimagentryedit = { version = "0.10.0", path = "../../../lib/entry/libimagentry
mdcat = { version = "0.13.0", optional = true } mdcat = { version = "0.13.0", optional = true }
[dependencies.pulldown-cmark] [dependencies.pulldown-cmark]
version = "0.5.2" version = "^0.4"
optional = true optional = true
default-features = false default-features = false
features = [] features = []

View file

@ -22,7 +22,7 @@ use std::io::Write;
use libimagstore::store::Entry; use libimagstore::store::Entry;
use libimagrt::runtime::Runtime; use libimagrt::runtime::Runtime;
use mdcat::{AnsiTerminal, ResourceAccess, TerminalSize}; use mdcat::{ResourceAccess, TerminalCapabilities, TerminalSize};
use pulldown_cmark::Parser; use pulldown_cmark::Parser;
use syntect::parsing::SyntaxSet; use syntect::parsing::SyntaxSet;
@ -57,9 +57,8 @@ impl<'a> Viewer for MarkdownViewer<'a> {
let base_dir = self.rt.rtp(); let base_dir = self.rt.rtp();
let syntax_set = SyntaxSet::load_defaults_newlines(); let syntax_set = SyntaxSet::load_defaults_newlines();
let mut term = AnsiTerminal::new(sink); ::mdcat::push_tty(sink,
TerminalCapabilities::ansi(),
::mdcat::push_tty(&mut term,
self.termsize.clone(), self.termsize.clone(),
parser, parser,
base_dir, base_dir,