From 843021a0ca545aac0ff2b868427a946bc189ff38 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 3 May 2022 00:24:17 +0100 Subject: [PATCH] [TEM #2] - Update Args::from_capture() comments --- src/links.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/links.rs b/src/links.rs index 88976ee..50d3821 100644 --- a/src/links.rs +++ b/src/links.rs @@ -244,15 +244,15 @@ impl<'a> Args<'a> { } fn from_capture(cap: Captures<'a>) -> Option> { - // https://regex101.com/r/lKSOOl/3 + // https://regex101.com/r/lKSOOl/4 let arg_type = match (cap.get(0), cap.get(1), cap.get(2), cap.get(3)) { - // This looks like {{$path}} + // This looks like [[#path]] (_, Some(argument), None, None) => Some(ArgsType::Plain(argument.as_str())), - // This looks like {{$path ../images}} + // This looks like [[#path ../images]] (_, _, Some(argument), Some(default_value)) => { Some(ArgsType::Default(argument.as_str(), default_value.as_str())) } - // This looks like \{{$any string}} + // This looks like \[[#any string]] (Some(mat), _, _, _) if mat.as_str().starts_with(ESCAPE_CHAR) => { Some(ArgsType::Escaped) }