Remove line breaks from path and do not allow search option for protocol links.
This commit is contained in:
@@ -138,16 +138,13 @@ fn parse_protocol_angle_link<'b, 'g, 'r, 's>(
|
||||
tuple((parser_with_context!(protocol)(context), tag(":"))),
|
||||
|(protocol, _)| LinkType::Protocol(protocol.into()),
|
||||
)(input)?;
|
||||
let (remaining, path) = alt((take_until("::"), rest))(remaining)?;
|
||||
let (remaining, search_option) = opt(map(tuple((tag("::"), rest)), |(_, search_option)| {
|
||||
search_option
|
||||
}))(remaining)?;
|
||||
let (remaining, path) = rest(remaining)?;
|
||||
Ok((
|
||||
remaining,
|
||||
PathAngle {
|
||||
link_type,
|
||||
path: path.into(),
|
||||
search_option: search_option.map(Into::<&str>::into),
|
||||
search_option: None,
|
||||
application: None,
|
||||
},
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user