Apply more suggestions.
This commit is contained in:
@@ -96,7 +96,7 @@ fn pre<'b, 'g, 'r, 's>(
|
||||
Some(_) => {
|
||||
// Not at start of line, cannot be a heading
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Not a valid pre character for plain link.".into(),
|
||||
"Not a valid pre character for plain link.",
|
||||
))));
|
||||
}
|
||||
};
|
||||
@@ -263,16 +263,13 @@ pub(crate) fn protocol<'b, 'g, 'r, 's>(
|
||||
) -> Res<OrgSource<'s>, OrgSource<'s>> {
|
||||
for link_parameter in context.get_global_settings().link_parameters {
|
||||
let result = tag_no_case::<_, _, CustomError<_>>(*link_parameter)(input);
|
||||
match result {
|
||||
Ok((remaining, ent)) => {
|
||||
return Ok((remaining, ent));
|
||||
}
|
||||
Err(_) => {}
|
||||
if let Ok((remaining, ent)) = result {
|
||||
return Ok((remaining, ent));
|
||||
}
|
||||
}
|
||||
|
||||
Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"NoLinkProtocol".into(),
|
||||
"NoLinkProtocol",
|
||||
))))
|
||||
}
|
||||
|
||||
@@ -346,7 +343,7 @@ fn impl_path_plain_end<'b, 'g, 'r, 's>(
|
||||
}
|
||||
|
||||
Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"No path plain end".into(),
|
||||
"No path plain end",
|
||||
))))
|
||||
}
|
||||
|
||||
@@ -435,6 +432,6 @@ fn _path_plain_parenthesis_end<'s>(
|
||||
}
|
||||
}
|
||||
Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"No closing parenthesis".into(),
|
||||
"No closing parenthesis",
|
||||
))))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user