Skip to content

Conversation

@lunaisnotaboy
Copy link
Collaborator

@lunaisnotaboy lunaisnotaboy commented Aug 8, 2024

This cleans up the repository's code. It is just minor things like formatting and layout, nothing else.

An .editorconfig was added for standardization of settings between different editors, and an improved .gitignore was also added. The .idea directory is now ignored due to it often being changed by users.

This will also allow code to be read more easily on smaller displays, such as my laptop.

Code is transformed from this:

public static StringBuilder AppendHtml(this StringBuilder builder, string tag, string? attributes, Action contents)
{
    builder.Append($"<{tag}");
    if (attributes != null)
    {
        builder.Append(' ');
        builder.Append(attributes);
    }
    builder.Append('>');

    contents();

    builder.Append($"</{tag}>");
    return builder;
}

To this:

public static StringBuilder AppendHtml(
    this StringBuilder builder,
    string tag,
    string? attributes,
    Action contents
) {
    builder.Append($"<{tag}");

    if (attributes != null) {
        builder.Append(' ');
        builder.Append(attributes);
    }

    builder.Append('>');

    contents();

    builder.Append($"</{tag}>");

    return builder;
}

@lunaisnotaboy lunaisnotaboy added the chore Code cleanup, formatting, refactors label Aug 8, 2024
@lunaisnotaboy lunaisnotaboy self-assigned this Aug 8, 2024
This directory, while it can be committed, often shouldn't due to each
user's customizations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Code cleanup, formatting, refactors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants