Skip to content

Conversation

@Pleezon
Copy link
Contributor

@Pleezon Pleezon commented Aug 7, 2023

  • added AutoCodeFormatter.java - a class focused on implementing functionality to remind users of using code syntax highlighting in help channels.
    Currently, the system uses "{" and "}" to detect a codeblock that isnt formatted correctly.
  • added a preference for enabling/disabling AutoCodeFormatter
  • added a Setting in HelpConfig: hint for when users don't format their code
  • added a Setting in HelpConfig: footnote for when code has been autoformatted
  • edited HelpListener to include a call to AutoCodeFormatter.java
  • moved replaceMemberMessage from HugListener to WebhookUtil to allow usage from within AutoCodeFormatter.java

Merge/deploy note

This should only be deployed with/after #422 because it uses preferences which are currently broken (the command is not registered).

- added AutoCodeFormatter.java
- added a preference for enabling/disabling AutoCodeFormatter
- added a Setting in HelpConfig: hint for when users don't format their code
- added a Setting in HelpConfig: footnote for when code has been autoformatted
- edited HelpListener to include a call to AutoCodeFormatter.java
- moved replaceMemberMessage from HugListener to WebhookUtil to allow usage from within AutoCodeFormatter.java
@Pleezon Pleezon requested a review from a team as a code owner August 7, 2023 14:34
@Pleezon
Copy link
Contributor Author

Pleezon commented Aug 7, 2023

*nvm my IDE is set to use spaces for indentation. I'll open a new pull request once I've changed that.

@Pleezon Pleezon closed this Aug 7, 2023
@danthe1st danthe1st reopened this Aug 7, 2023
Copy link
Member

@danthe1st danthe1st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are writing way to much code in a single line making the code hard to read.

@danthe1st
Copy link
Member

danthe1st commented Aug 7, 2023

Also, this should only be deployed with/after #422 because it uses preferences which are currently broken (the command is not registered).

@Pleezon
Copy link
Contributor Author

Pleezon commented Aug 8, 2023

** removed unused method

@danthe1st
Copy link
Member

** removed unused method

The constant FORMAT_HINT_IDENTIFIER still exists. Is that in use somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants