Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup the repository #76

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

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.
@lunaisnotaboy lunaisnotaboy force-pushed the chore/cleanup-repository branch from 2c606a8 to 01593ab Compare November 12, 2024 21:30
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.

1 participant