mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-07-26 15:19:47 +02:00
Fix grammar
This commit is contained in:
@@ -72,7 +72,7 @@ public partial record Embed
|
||||
|
||||
// Under the Discord API model, embeds can only have at most one image.
|
||||
// Because of that, embeds that are rendered with multiple images on the client
|
||||
// (e.g. tweet embeds), are exposed from the API as multiple separate embeds.
|
||||
// (e.g., tweet embeds), are exposed from the API as multiple separate embeds.
|
||||
// Our embed model is consistent with the user-facing side of Discord, so images
|
||||
// are stored as an array. The API will only ever return one image, but we deal
|
||||
// with this by merging related embeds at the end of the message parsing process.
|
||||
|
||||
@@ -10,14 +10,14 @@ namespace DiscordChatExporter.Core.Discord.Data;
|
||||
public partial record Emoji(
|
||||
// Only present on custom emoji
|
||||
Snowflake? Id,
|
||||
// Name of a custom emoji (e.g. LUL) or actual representation of a standard emoji (e.g. 🙂)
|
||||
// Name of a custom emoji (e.g., LUL) or actual representation of a standard emoji (e.g., 🙂)
|
||||
string Name,
|
||||
bool IsAnimated
|
||||
)
|
||||
{
|
||||
public bool IsCustomEmoji { get; } = Id is not null;
|
||||
|
||||
// Name of a custom emoji (e.g. LUL) or name of a standard emoji (e.g. slight_smile)
|
||||
// Name of a custom emoji (e.g., LUL) or name of a standard emoji (e.g., slight_smile)
|
||||
public string Code { get; } = Id is not null ? Name : EmojiIndex.TryGetCode(Name) ?? Name;
|
||||
|
||||
public string ImageUrl { get; } =
|
||||
|
||||
@@ -208,7 +208,7 @@ public partial class ExportRequest
|
||||
|
||||
// Determine whether the output path refers to a directory or a file.
|
||||
// The extension-based heuristic is evaluated on the original, unsubstituted path,
|
||||
// because the value of a template token (e.g. a guild or channel name) may contain
|
||||
// because the value of a template token (e.g., a guild or channel name) may contain
|
||||
// a period that would otherwise be mistaken for a file extension, incorrectly causing
|
||||
// a directory path to be treated as a file.
|
||||
// https://github.com/Tyrrrz/DiscordChatExporter/issues/1502
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace DiscordChatExporter.Core.Markdown;
|
||||
internal record EmojiNode(
|
||||
// Only present on custom emoji
|
||||
Snowflake? Id,
|
||||
// Name of a custom emoji (e.g. LUL) or actual representation of a standard emoji (e.g. 🙂)
|
||||
// Name of a custom emoji (e.g., LUL) or actual representation of a standard emoji (e.g., 🙂)
|
||||
string Name,
|
||||
bool IsAnimated
|
||||
) : MarkdownNode
|
||||
@@ -20,7 +20,7 @@ internal record EmojiNode(
|
||||
|
||||
public bool IsCustomEmoji => _emoji.IsCustomEmoji;
|
||||
|
||||
// Name of a custom emoji (e.g. LUL) or name of a standard emoji (e.g. slight_smile)
|
||||
// Name of a custom emoji (e.g., LUL) or name of a standard emoji (e.g., slight_smile)
|
||||
public string Code => _emoji.Code;
|
||||
|
||||
public string ImageUrl => _emoji.ImageUrl;
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace DiscordChatExporter.Core.Markdown;
|
||||
|
||||
// Named links can contain child nodes (e.g. [**bold URL**](https://test.com))
|
||||
// Named links can contain child nodes (e.g., [**bold URL**](https://test.com))
|
||||
internal record LinkNode(string Url, IReadOnlyList<MarkdownNode> Children)
|
||||
: MarkdownNode,
|
||||
IContainerNode
|
||||
|
||||
@@ -209,7 +209,7 @@ internal static partial class MarkdownParser
|
||||
new RegexMatcher<MarkdownContext, MarkdownNode>(
|
||||
new Regex(
|
||||
// Build a pattern from all known emoji, sorted longest-first so that compound
|
||||
// emoji (e.g. sequences with ZWJ or skin-tone modifiers) are matched before
|
||||
// emoji (e.g., sequences with ZWJ or skin-tone modifiers) are matched before
|
||||
// their individual components.
|
||||
"("
|
||||
+ string.Join(
|
||||
@@ -408,7 +408,7 @@ internal static partial class MarkdownParser
|
||||
TimestampNodeMatcher
|
||||
);
|
||||
|
||||
// Minimal set of matchers for non-multimedia formats (e.g. plain text)
|
||||
// Minimal set of matchers for non-multimedia formats (e.g., plain text)
|
||||
private static readonly IMatcher<MarkdownContext, MarkdownNode> MinimalNodeMatcher =
|
||||
new AggregateMatcher<MarkdownContext, MarkdownNode>(
|
||||
// Mentions
|
||||
|
||||
Reference in New Issue
Block a user