~matthiasbeyer/imag

6bc08b60e6e3a99cc9a263713db33061d63dc964 — Matthias Beyer a month ago be50f5a + 1f86bcd
Merge branch 'update-deps' into master

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
M bin/core/imag-view/Cargo.toml => bin/core/imag-view/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.6"
toml = "0.5.1"
toml-query = "0.10"
handlebars = "2"
handlebars = "3"
tempfile = "3.0.9"
anyhow = "1"
resiter = "0.4.0"

M bin/domain/imag-bookmark/Cargo.toml => bin/domain/imag-bookmark/Cargo.toml +2 -2
@@ 26,7 26,7 @@ toml-query = "0.10"
anyhow = "1"
resiter = "0.4.0"
url = "2"
handlebars = "2"
handlebars = "3"
rayon = "1"

libimagrt        = { version = "0.10.0", path = "../../../lib/core/libimagrt" }


@@ 43,7 43,7 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]

[dependencies.uuid]
version = "0.7"
version = "0.8"
default-features = false
features = ["serde", "v4"]


M bin/domain/imag-calendar/Cargo.toml => bin/domain/imag-calendar/Cargo.toml +1 -1
@@ 26,7 26,7 @@ anyhow     = "1"
failure    = "0.1"
walkdir    = "2.2.8"
vobject    = "0.7"
handlebars = "2"
handlebars = "3"
chrono     = "0.4"
kairos     = "0.3"
resiter    = "0.4.0"

M bin/domain/imag-calendar/src/util.rs => bin/domain/imag-calendar/src/util.rs +2 -2
@@ 71,8 71,8 @@ impl<'a> ParsedEventFLE<'a> {
    }
}

pub fn get_event_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches)
    -> Result<Handlebars>
pub fn get_event_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches)
    -> Result<Handlebars<'rc>>
{
    scmd.value_of("format")
        .map(String::from)

M bin/domain/imag-contact/Cargo.toml => bin/domain/imag-contact/Cargo.toml +2 -2
@@ 23,9 23,9 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.6"
toml = "0.5.1"
vobject    = "0.7.0"
handlebars = "2"
handlebars = "3"
walkdir = "2.2.8"
uuid = { version = "0.7.4", features = ["v4"] }
uuid = { version = "0.8", features = ["v4"] }
serde_json = "1.0.39"
anyhow = "1"
resiter = "0.4"

M bin/domain/imag-contact/src/lib.rs => bin/domain/imag-contact/src/lib.rs +1 -1
@@ 380,7 380,7 @@ fn find(rt: &Runtime) -> Result<()> {
    }
}

fn get_contact_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> {
fn get_contact_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> {
    let fmt = match scmd.value_of("format").map(String::from) {
        Some(s) => Ok(s),
        None => rt.config()

M bin/domain/imag-diary/Cargo.toml => bin/domain/imag-diary/Cargo.toml +1 -1
@@ 24,7 24,7 @@ chrono = "0.4.7"
log = "0.4.6"
toml = "0.5.1"
toml-query = "0.10"
itertools = "0.8.0"
itertools = "0.9.0"
anyhow = "1"
resiter = "0.4.0"
option-inspect = "0.1.0"

M bin/domain/imag-log/Cargo.toml => bin/domain/imag-log/Cargo.toml +1 -1
@@ 24,7 24,7 @@ log = "0.4.6"
toml = "0.5.1"
toml-query = "0.10"
is-match = "0.1.0"
itertools = "0.8.0"
itertools = "0.9.0"
anyhow = "1"
textwrap = "0.11.0"
resiter = "0.4.0"

M bin/domain/imag-mail/Cargo.toml => bin/domain/imag-mail/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.6"
anyhow = "1"
resiter = "0.4"
handlebars = "2"
handlebars = "3"
walkdir = "2"
rayon = "1"


M bin/domain/imag-mail/src/util.rs => bin/domain/imag-mail/src/util.rs +1 -1
@@ 32,7 32,7 @@ use libimagrt::runtime::Runtime;
use libimagstore::store::FileLockEntry;
use libimagentryref::reference::Config as RefConfig;

pub fn get_mail_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> {
pub fn get_mail_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> {
    let fmt = match scmd.value_of("format").map(String::from) {
        Some(s) => Ok(s),
        None => {

M bin/domain/imag-notes/Cargo.toml => bin/domain/imag-notes/Cargo.toml +1 -1
@@ 21,7 21,7 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
log = "0.4.6"
itertools = "0.8.0"
itertools = "0.9.0"
anyhow = "1"
resiter = "0.4.0"


M bin/domain/imag-timetrack/Cargo.toml => bin/domain/imag-timetrack/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.6"
chrono = "0.4.7"
filters = "0.3.0"
itertools = "0.8.0"
itertools = "0.9.0"
prettytable-rs = "0.8.0"
kairos  = "0.3.0"
anyhow = "1"

M bin/domain/imag-todo/Cargo.toml => bin/domain/imag-todo/Cargo.toml +3 -3
@@ 29,7 29,7 @@ chrono = "0.4"
filters = "0.3"
kairos = "0.3"
resiter = "0.4.0"
handlebars = "2"
handlebars = "3"
prettytable-rs = "0.8.0"

libimagrt        = { version = "0.10.0", path = "../../../lib/core/libimagrt" }


@@ 47,11 47,11 @@ default-features = false
features = ["color", "suggestions", "wrap_help"]

[dependencies.task-hookrs]
version = "0.7.0"
git = "https://github.com/matthiasbeyer/task-hookrs"
optional = true

[dependencies.uuid]
version = "0.7.4"
version = "0.8"
features = ["v4"]
optional = true


M bin/domain/imag-todo/src/util.rs => bin/domain/imag-todo/src/util.rs +1 -1
@@ 38,7 38,7 @@ pub fn get_dt_str(d: Result<Option<NaiveDateTime>>, s: &str) -> Result<String> {
       .unwrap_or_else(|| s.to_string()))
}

pub fn get_todo_print_format(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars> {
pub fn get_todo_print_format<'rc>(config_value_path: &'static str, rt: &Runtime, scmd: &ArgMatches) -> Result<Handlebars<'rc>> {
    let fmt = match scmd.value_of("format").map(String::from) {
        Some(s) => Ok(s),
        None => {

M lib/core/libimagrt/Cargo.toml => lib/core/libimagrt/Cargo.toml +2 -2
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
env_logger = "0.7"
toml = "0.5.1"
xdg-basedir = "1.0.0"
itertools = "0.8.0"
itertools = "0.9.0"
ansi_term = "0.12"
atty = "0.2.11"
anyhow = "1"


@@ 48,7 48,7 @@ default-features = false
features = ["std", "serde"]

[dependencies.handlebars]
version          = "2"
version          = "3"
default-features = false
features         = ["no_logging"]


M lib/core/libimagrt/src/logger.rs => lib/core/libimagrt/src/logger.rs +5 -5
@@ 48,19 48,19 @@ impl Default for LogDestination {

/// Logger implementation for `log` crate.
#[derive(Debug)]
pub struct ImagLogger {
pub struct ImagLogger<'rc> {
    global_loglevel     : Level,

    #[allow(unused)]
    global_destinations : Vec<LogDestination>,

    handlebars: Handlebars,
    handlebars: Handlebars<'rc>,
}

impl ImagLogger {
impl<'rc> ImagLogger<'rc> {

    /// Create a new ImagLogger object with a certain level
    pub fn new(matches: &ArgMatches, config: Option<&Value>) -> Result<ImagLogger> {
    pub fn new(matches: &ArgMatches, config: Option<&Value>) -> Result<ImagLogger<'rc>> {
        let mut handlebars = Handlebars::new();

        handlebars.register_escape_fn(::handlebars::no_escape);


@@ 90,7 90,7 @@ impl ImagLogger {

}

impl Log for ImagLogger {
impl<'rc> Log for ImagLogger<'rc> {

    fn enabled(&self, metadata: &Metadata) -> bool {
        metadata.level() <= self.global_loglevel

M lib/core/libimagstore/Cargo.toml => lib/core/libimagstore/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
glob = "0.3.0"
log = "0.4.6"
regex = "1.1.7"
semver = "0.9.0"
semver = "0.10.0"
toml = "0.5.1"
walkdir = "2.2.8"
is-match = "0.1.0"

M lib/domain/libimagbookmark/Cargo.toml => lib/domain/libimagbookmark/Cargo.toml +1 -1
@@ 31,7 31,7 @@ libimagentryurl  = { version = "0.10.0", path = "../../../lib/entry/libimagentry
libimagentryutil = { version = "0.10.0", path = "../../../lib/entry/libimagentryutil" }

[dependencies.uuid]
version = "0.7"
version = "0.8"
default-features = false
features = ["serde", "v4"]


M lib/domain/libimagcontact/Cargo.toml => lib/domain/libimagcontact/Cargo.toml +1 -1
@@ 26,7 26,7 @@ log          = "0.4.6"
toml         = "0.5.1"
toml-query   = "0.10"
vobject      = "0.7.0"
uuid         = "0.7.4"
uuid         = "0.8"
serde        = "1.0.94"
serde_derive = "1.0.94"


M lib/domain/libimagdiary/Cargo.toml => lib/domain/libimagdiary/Cargo.toml +1 -1
@@ 24,7 24,7 @@ chrono = "0.4.7"
log = "0.4.6"
toml = "0.5.1"
toml-query = "0.10"
itertools = "0.8.0"
itertools = "0.9.0"
anyhow = "1"
filters = "0.3.0"


M lib/domain/libimagtodo/Cargo.toml => lib/domain/libimagtodo/Cargo.toml +1 -1
@@ 44,7 44,7 @@ default-features = false
features = ["serde"]

[dependencies.uuid]
version = "0.7"
version = "0.8"
default-features = false
features = ["serde", "v4"]


M lib/entry/libimagentryannotation/Cargo.toml => lib/entry/libimagentryannotation/Cargo.toml +1 -1
@@ 25,7 25,7 @@ toml = "0.5.1"
toml-query = "0.10"
anyhow = "1"

uuid           = { version = "0.7.4", features = ["v4"] }
uuid           = { version = "0.8", features = ["v4"] }
log            = "0.4.6"



M lib/entry/libimagentryfilter/Cargo.toml => lib/entry/libimagentryfilter/Cargo.toml +2 -2
@@ 21,10 21,10 @@ maintenance                       = { status     = "actively-developed" }

[dependencies]
filters = "0.3.0"
itertools = "0.8.0"
itertools = "0.9.0"
log = "0.4.6"
regex = "1.1.7"
semver = "0.9.0"
semver = "0.10.0"
toml = "0.5.1"
toml-query = "0.10"
anyhow = "1"

M lib/entry/libimagentrylink/Cargo.toml => lib/entry/libimagentrylink/Cargo.toml +1 -1
@@ 20,7 20,7 @@ is-it-maintained-open-issues      = { repository = "matthiasbeyer/imag" }
maintenance                       = { status     = "actively-developed" }

[dependencies]
itertools = "0.8.0"
itertools = "0.9.0"
log = "0.4.6"
toml = "0.5.1"
url = "2"

M lib/entry/libimagentryref/Cargo.toml => lib/entry/libimagentryref/Cargo.toml +1 -1
@@ 20,7 20,7 @@ is-it-maintained-open-issues      = { repository = "matthiasbeyer/imag" }
maintenance                       = { status     = "actively-developed" }

[dependencies]
itertools    = "0.8.0"
itertools    = "0.9.0"
log          = "0.4.6"
anyhow = "1"
sha-1        = "0.8.1"

M lib/entry/libimagentrytag/Cargo.toml => lib/entry/libimagentrytag/Cargo.toml +1 -1
@@ 23,7 23,7 @@ maintenance                       = { status     = "actively-developed" }
log = "0.4.6"
regex = "1.1.7"
toml = "0.5.1"
itertools = "0.8.0"
itertools = "0.9.0"
filters = "0.3.0"
anyhow = "1"
serde        = "1.0.94"

M lib/entry/libimagentryurl/Cargo.toml => lib/entry/libimagentryurl/Cargo.toml +1 -1
@@ 20,7 20,7 @@ is-it-maintained-open-issues      = { repository = "matthiasbeyer/imag" }
maintenance                       = { status     = "actively-developed" }

[dependencies]
itertools = "0.8.0"
itertools = "0.9.0"
log = "0.4.6"
toml = "0.5.1"
url = "2"

M lib/entry/libimagentryview/Cargo.toml => lib/entry/libimagentryview/Cargo.toml +2 -2
@@ 30,7 30,7 @@ libimagstore     = { version = "0.10.0", path = "../../../lib/core/libimagstore"
libimagerror     = { version = "0.10.0", path = "../../../lib/core/libimagerror" }
libimagentryedit = { version = "0.10.0", path = "../../../lib/entry/libimagentryedit" }

mdcat   = { version = "0.15.0", optional = true }
mdcat   = { version = "0.17.0", optional = true }

[dependencies.pulldown-cmark]
version          = "^0.7"


@@ 39,7 39,7 @@ default-features = false
features         = []

[dependencies.syntect]
version          = "3"
version          = "4"
optional         = true
default-features = false
features         = ["parsing", "assets", "dump-load"]

M lib/entry/libimagentryview/src/builtin/md.rs => lib/entry/libimagentryview/src/builtin/md.rs +16 -23
@@ 30,22 30,11 @@ use anyhow::format_err;

use crate::viewer::Viewer;

pub struct MarkdownViewer<'a> {
    rt:                 &'a Runtime<'a>,
    resource_access:    ResourceAccess,
    termsize:           TerminalSize,
}
pub struct MarkdownViewer<'a>(&'a Runtime<'a>);

impl<'a> MarkdownViewer<'a> {
    pub fn new(rt: &'a Runtime) -> Self {
        MarkdownViewer {
            rt,
            resource_access: ResourceAccess::LocalOnly,
            termsize:        TerminalSize::detect().unwrap_or(TerminalSize {
                width: 80,
                height: 20,
            }),
        }
        MarkdownViewer(rt)
    }
}



@@ 53,18 42,22 @@ impl<'a> Viewer for MarkdownViewer<'a> {
    fn view_entry<W>(&self, e: &Entry, sink: &mut W) -> Result<()>
        where W: Write
    {
        let parser          = Parser::new(e.get_content());
        let base_dir        = self.rt.rtp();
        let syntax_set      = SyntaxSet::load_defaults_newlines();
        let capa            = TerminalCapabilities::ansi();
        let parser   = Parser::new(e.get_content());
        let base_dir = self.0.rtp();
        let settings = mdcat::Settings {
            terminal_capabilities: TerminalCapabilities::ansi(),
            syntax_set: SyntaxSet::load_defaults_newlines(),
            resource_access: ResourceAccess::LocalOnly,
            terminal_size: TerminalSize::detect().unwrap_or(TerminalSize {
                width: 80,
                height: 20,
            }),
        };

        ::mdcat::push_tty(sink,
                          &capa,
                          self.termsize,
                          parser,
        ::mdcat::push_tty(&settings,
                          sink,
                          base_dir,
                          self.resource_access,
                          syntax_set)
                          parser)
        .map_err(|_| format_err!("Failed while formatting markdown"))
    }
}

M lib/etc/libimaginteraction/Cargo.toml => lib/etc/libimaginteraction/Cargo.toml +1 -1
@@ 26,7 26,7 @@ lazy_static = "1.3.0"
log = "0.4.6"
regex = "1.1.7"
toml = "0.5.1"
handlebars = "2"
handlebars = "3"
serde_json = "1.0.39"
serde_derive = "1"
serde = "1"

M lib/etc/libimaginteraction/src/format.rs => lib/etc/libimaginteraction/src/format.rs +16 -16
@@ 66,7 66,7 @@ impl From<String> for HandlebarsData {
pub struct ColorizeBlackHelper;

impl HelperDef for ColorizeBlackHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Black, h, out)
    }
}


@@ 75,7 75,7 @@ impl HelperDef for ColorizeBlackHelper {
pub struct ColorizeBlueHelper;

impl HelperDef for ColorizeBlueHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Blue, h, out)
    }
}


@@ 84,7 84,7 @@ impl HelperDef for ColorizeBlueHelper {
pub struct ColorizeCyanHelper;

impl HelperDef for ColorizeCyanHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Cyan, h, out)
    }
}


@@ 93,7 93,7 @@ impl HelperDef for ColorizeCyanHelper {
pub struct ColorizeGreenHelper;

impl HelperDef for ColorizeGreenHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Green, h, out)
    }
}


@@ 102,7 102,7 @@ impl HelperDef for ColorizeGreenHelper {
pub struct ColorizePurpleHelper;

impl HelperDef for ColorizePurpleHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Purple, h, out)
    }
}


@@ 111,7 111,7 @@ impl HelperDef for ColorizePurpleHelper {
pub struct ColorizeRedHelper;

impl HelperDef for ColorizeRedHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Red, h, out)
    }
}


@@ 120,7 120,7 @@ impl HelperDef for ColorizeRedHelper {
pub struct ColorizeWhiteHelper;

impl HelperDef for ColorizeWhiteHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::White, h, out)
    }
}


@@ 129,7 129,7 @@ impl HelperDef for ColorizeWhiteHelper {
pub struct ColorizeYellowHelper;

impl HelperDef for ColorizeYellowHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        colorize(Colour::Yellow, h, out)
    }
}


@@ 146,7 146,7 @@ fn colorize(color: Colour, h: &Helper, output: &mut dyn Output) -> Result<(), Re
pub struct UnderlineHelper;

impl HelperDef for UnderlineHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
            let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?;
            let s = Style::new().underline();
            out.write(&format!("{}", s.paint(p.value().render())))?;


@@ 158,7 158,7 @@ impl HelperDef for UnderlineHelper {
pub struct BoldHelper;

impl HelperDef for BoldHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
            let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?;
            let s = Style::new().bold();
            out.write(&format!("{}", s.paint(p.value().render())))?;


@@ 170,7 170,7 @@ impl HelperDef for BoldHelper {
pub struct BlinkHelper;

impl HelperDef for BlinkHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
            let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?;
            let s = Style::new().blink();
            out.write(&format!("{}", s.paint(p.value().render())))?;


@@ 182,7 182,7 @@ impl HelperDef for BlinkHelper {
pub struct StrikethroughHelper;

impl HelperDef for StrikethroughHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
            let p = h.param(0).ok_or_else(|| RenderError::new("Too few arguments"))?;
            let s = Style::new().strikethrough();
            out.write(&format!("{}", s.paint(p.value().render())))?;


@@ 215,7 215,7 @@ fn param_to_number(idx: usize, h: &Helper) -> Result<u64, RenderError> {
pub struct LeftPadHelper;

impl HelperDef for LeftPadHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        let count = param_to_number(0, h)? as usize;
        let text = h.param(1).ok_or_else(|| RenderError::new("Too few arguments"))?;
        let text = format!("{:>width$}", text.value().render(), width = count);


@@ 228,7 228,7 @@ impl HelperDef for LeftPadHelper {
pub struct RightPadHelper;

impl HelperDef for RightPadHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        let count = param_to_number(0, h)? as usize;
        let text = h.param(1).ok_or_else(|| RenderError::new("Too few arguments"))?;
        let text = format!("{:width$}", text.value().render(), width = count);


@@ 241,7 241,7 @@ impl HelperDef for RightPadHelper {
pub struct AbbrevHelper;

impl HelperDef for AbbrevHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        let count = param_to_number(0, h)? as usize;
        let text = h.param(1).ok_or_else(|| RenderError::new("Too few arguments"))?.value().render();
        out.write(&text.chars().take(count).collect::<String>())?;


@@ 254,7 254,7 @@ impl HelperDef for AbbrevHelper {
pub struct IndentionHelper;

impl HelperDef for IndentionHelper {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg>, out: &mut dyn Output) -> Result<(), RenderError> {
    fn call<'reg: 'rc, 'rc>(&self, h: &Helper<'reg, 'rc>, _r: &'reg Registry, _ctx: &'rc Context, _rc: &mut RenderContext<'reg, 'rc>, out: &mut dyn Output) -> Result<(), RenderError> {
        let count = param_to_number(0, h)? as usize;
        let text = h.param(1).ok_or_else(|| RenderError::new("Too few arguments"))?.value().render();
        out.write(&::std::iter::repeat(text).take(count).collect::<String>())?;

M tests/ui/Cargo.toml => tests/ui/Cargo.toml +3 -3
@@ 11,13 11,13 @@ license = "LGPL-2.1"
publish = false

[dependencies]
assert_cmd        = "0.11"
assert_fs         = "0.11"
assert_cmd        = "1"
assert_fs         = "1"
duct              = "0.13"
env_logger        = "0.7"
log               = "0.4"
predicates        = "1"
pretty_assertions = "0.6"
semver            = "0.9"
semver            = "0.10"
version           = "3"


M tests/ui/src/imag.rs => tests/ui/src/imag.rs +3 -1
@@ 25,7 25,9 @@ use assert_cmd::prelude::*;
use assert_cmd::assert::Assert;

pub fn make_temphome() -> TempDir {
    TempDir::new().unwrap().persist_if(std::env::var("IMAG_UI_TEST_PERSIST").is_ok())
    TempDir::new()
        .unwrap()
        .into_persistent_if(std::env::var("IMAG_UI_TEST_PERSIST").is_ok())
}

pub fn binary(tempdir: &TempDir, binary_name: &str) -> Command {

M tests/version-sync/Cargo.toml => tests/version-sync/Cargo.toml +1 -1
@@ 13,7 13,7 @@ publish = false
[dev-dependencies]
env_logger   = "0.7"
log          = "0.4.6"
version-sync = "0.8"
version-sync = "0.9"
walkdir      = "2"
toml-query   = "0.10"
toml         = "0.5"