mirror of
https://github.com/mastodon/mastodon.git
synced 2025-12-02 20:33:39 +00:00
Fix typos in some files
This commit is contained in:
parent
f25e066112
commit
b0218301bd
|
|
@ -45,7 +45,7 @@ function isNodeLinkHashtag(element: Node): element is HTMLLinkElement {
|
||||||
* Removes duplicates from an hashtag list, case-insensitive, keeping only the best one
|
* Removes duplicates from an hashtag list, case-insensitive, keeping only the best one
|
||||||
* "Best" here is defined by the one with the more casing difference (ie, the most camel-cased one)
|
* "Best" here is defined by the one with the more casing difference (ie, the most camel-cased one)
|
||||||
* @param hashtags The list of hashtags
|
* @param hashtags The list of hashtags
|
||||||
* @returns The input hashtags, but with only 1 occurence of each (case-insensitive)
|
* @returns The input hashtags, but with only 1 occurrence of each (case-insensitive)
|
||||||
*/
|
*/
|
||||||
function uniqueHashtagsWithCaseHandling(hashtags: string[]) {
|
function uniqueHashtagsWithCaseHandling(hashtags: string[]) {
|
||||||
const groups = groupBy(hashtags, (tag) =>
|
const groups = groupBy(hashtags, (tag) =>
|
||||||
|
|
@ -76,7 +76,7 @@ function uniqueHashtagsWithCaseHandling(hashtags: string[]) {
|
||||||
|
|
||||||
// Create the collator once, this is much more efficient
|
// Create the collator once, this is much more efficient
|
||||||
const collator = new Intl.Collator(undefined, {
|
const collator = new Intl.Collator(undefined, {
|
||||||
sensitivity: 'base', // we use this to emulate the ASCII folding done on the server-side, hopefuly more efficiently
|
sensitivity: 'base', // we use this to emulate the ASCII folding done on the server-side, hopefully more efficiently
|
||||||
});
|
});
|
||||||
|
|
||||||
function localeAwareInclude(collection: string[], value: string) {
|
function localeAwareInclude(collection: string[], value: string) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user