Compare radio link properties.
This commit is contained in:
@@ -30,6 +30,7 @@ pub(crate) fn radio_link<'b, 'g, 'r, 's>(
|
||||
for radio_target in &context.get_global_settings().radio_targets {
|
||||
let rematched_target = rematch_target(context, radio_target, input);
|
||||
if let Ok((remaining, rematched_target)) = rematched_target {
|
||||
let path = get_consumed(input, remaining);
|
||||
let (remaining, _) = space0(remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
return Ok((
|
||||
@@ -37,6 +38,8 @@ pub(crate) fn radio_link<'b, 'g, 'r, 's>(
|
||||
RadioLink {
|
||||
source: source.into(),
|
||||
children: rematched_target,
|
||||
path: path.into(),
|
||||
raw_link: path.into(),
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ fn regular_link_without_description<'b, 'g, 'r, 's>(
|
||||
path: path.path,
|
||||
raw_link: path.raw_link,
|
||||
search_option: path.search_option,
|
||||
children: Vec::new(),
|
||||
},
|
||||
))
|
||||
}
|
||||
@@ -80,7 +81,7 @@ fn regular_link_with_description<'b, 'g, 'r, 's>(
|
||||
let (remaining, _opening_bracket) = tag("[[")(input)?;
|
||||
let (remaining, path) = pathreg(context, remaining)?;
|
||||
let (remaining, _closing_bracket) = tag("][")(remaining)?;
|
||||
let (remaining, _description) = description(context, remaining)?;
|
||||
let (remaining, description) = description(context, remaining)?;
|
||||
let (remaining, _closing_bracket) = tag("]]")(remaining)?;
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
@@ -93,6 +94,7 @@ fn regular_link_with_description<'b, 'g, 'r, 's>(
|
||||
path: path.path,
|
||||
raw_link: path.raw_link,
|
||||
search_option: path.search_option,
|
||||
children: description,
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user