Use trim_tries to extract post comment over simple trim_matches
This commit is contained in:
parent
612f1af734
commit
9df1dbe1ac
@ -288,9 +288,9 @@ impl Chain {
|
||||
return;
|
||||
}
|
||||
// HACK: Treat `?`s as separators.
|
||||
let trimmed_snippet = post_comment_snippet.trim_matches('?');
|
||||
let comment_end = get_comment_end(trimmed_snippet, "?", "", false);
|
||||
let maybe_post_comment = extract_post_comment(trimmed_snippet, comment_end, "?")
|
||||
let trimmed_snippet = trim_tries(post_comment_snippet);
|
||||
let comment_end = get_comment_end(&trimmed_snippet, "?", "", false);
|
||||
let maybe_post_comment = extract_post_comment(&trimmed_snippet, comment_end, "?")
|
||||
.and_then(|comment| {
|
||||
if comment.is_empty() {
|
||||
None
|
||||
|
Loading…
x
Reference in New Issue
Block a user