mirror of
https://github.com/pseXperiments/freedit.git
synced 2026-01-10 12:17:54 -05:00
fix typos
This commit is contained in:
@@ -314,7 +314,7 @@ fn increment(old: Option<&[u8]>) -> Option<Vec<u8>> {
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// The tag length should be less than or equal to 25. And the results shoule be no more than `max_len`.
|
||||
/// The tag length should be less than or equal to 25. And the results should be no more than `max_len`.
|
||||
/// If no space is found after the `char`, the string will be ignored.
|
||||
///
|
||||
/// # Examples
|
||||
|
||||
@@ -809,7 +809,7 @@ pub(crate) async fn feed_subscribe(
|
||||
let feed_id_ivec = &k[(k.len() - 4)..];
|
||||
if u8_slice_to_u32(feed_id_ivec) == feed_id {
|
||||
if uid == claim.uid {
|
||||
// user unsubsribe
|
||||
// user unsubscribe
|
||||
user_folder_tree.remove(k)?;
|
||||
} else {
|
||||
// add other's feed
|
||||
|
||||
@@ -731,7 +731,7 @@ pub(crate) async fn edit_post_post(
|
||||
}
|
||||
|
||||
let mut content = input.content;
|
||||
// extract @username or @uid notificaiton
|
||||
// extract @username or @uid notification
|
||||
let notifications = extract_element(&content, 5, '@');
|
||||
for notification in ¬ifications {
|
||||
let (uid, username) = match notification.parse::<u32>() {
|
||||
@@ -1608,7 +1608,7 @@ pub(crate) async fn post(
|
||||
<p>Warning</p>
|
||||
</div>
|
||||
<div class="message-body">
|
||||
This post was published <b>{} days ago</b>. The infomation described in this article may have changed.
|
||||
This post was published <b>{} days ago</b>. The information described in this article may have changed.
|
||||
</div>
|
||||
</article>
|
||||
"#,
|
||||
@@ -1789,7 +1789,7 @@ pub(crate) async fn comment_post(
|
||||
|
||||
let mut content = input.content;
|
||||
|
||||
// extract @username or @uid notificaiton
|
||||
// extract @username or @uid notification
|
||||
let notifications = extract_element(&content, 5, '@');
|
||||
for notification in ¬ifications {
|
||||
let (uid, username) = match notification.parse::<u32>() {
|
||||
|
||||
@@ -220,10 +220,10 @@ impl<'a> PageData<'a> {
|
||||
pub(super) fn get_referer(header: Option<TypedHeader<Referer>>) -> Option<String> {
|
||||
if let Some(TypedHeader(r)) = header {
|
||||
let referer = format!("{r:?}");
|
||||
let trimed = referer
|
||||
let trimmed = referer
|
||||
.trim_start_matches("Referer(\"")
|
||||
.trim_end_matches("\")");
|
||||
Some(trimed.to_owned())
|
||||
Some(trimmed.to_owned())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ pub(crate) async fn solo_post(
|
||||
content = content.replace(&format!("#{tag}"), &tag_link);
|
||||
}
|
||||
|
||||
// extract @username or @uid notificaiton
|
||||
// extract @username or @uid notification
|
||||
let notifications = extract_element(&content, 5, '@');
|
||||
for notification in ¬ifications {
|
||||
let (uid, username) = match notification.parse::<u32>() {
|
||||
|
||||
@@ -110,10 +110,10 @@ pub(crate) async fn search(
|
||||
}
|
||||
}
|
||||
|
||||
let mut out_searchs = Vec::with_capacity(20);
|
||||
let mut out_searches = Vec::with_capacity(20);
|
||||
for id in ids {
|
||||
if let Some(out) = OutSearch::get(&id, &DB) {
|
||||
out_searchs.push(out);
|
||||
out_searches.push(out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ pub(crate) async fn search(
|
||||
let page_data = PageData::new("Search", &site_config, claim, has_unread);
|
||||
let page_search = PageSearch {
|
||||
page_data,
|
||||
outs: out_searchs,
|
||||
outs: out_searches,
|
||||
search: input.search,
|
||||
offset,
|
||||
uid: input.uid,
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</a>
|
||||
<a href="/user/{{val.uid}}">
|
||||
<span class="icon is-large">
|
||||
<span class="image is-squre"><img src="/static/avatars/{{val.uid}}.png" alt="{{val.username}}"></span>
|
||||
<span class="image is-square"><img src="/static/avatars/{{val.uid}}.png" alt="{{val.username}}"></span>
|
||||
</span>
|
||||
</a>
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user