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

Improve message for codeblock for conciseness and add a recommendation for length #3

Open
ecoerod opened this issue Jan 21, 2019 · 2 comments

Comments

@ecoerod
Copy link

ecoerod commented Jan 21, 2019

What is it?

It's been suggested to rework the -mod tag codeblock command to improve its conciseness without losing clarity and add a recommendation to redirect the code to an online hosting side (hastebin, gist).

Why do you think it's important to have?

New users have always had trouble learning how to input codeblocks in Discord, and on the other hand having long blocks of code in the server breaks discussion by scrolling the chat too much. We can do better.

Is there an alternative way of doing it (other than the one you're proposing)?

We can make the length requirement a rule, but I don't think it's necessary.

Why what you're suggesting is better than the alternatives?

N/A

How much extra work of the mod team will the implementation require?

None.

What are the technical requirements of implementing it?

None.

Any live examples of where it currently works?

N/A

@ecoerod
Copy link
Author

ecoerod commented Jan 21, 2019

Current iteration:

Use codeblocks for formatting code (line breaks matter!):
\`\`\`language_name
# code here
\`\`\`

For example:
\`\`\`python
if True:
    print("Hi!")
\`\`\`
prints:
if True:
    print("Hi!")

You can find the available language names here: https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html#language-names-and-aliases

@Samoxive
Copy link

It seems most issue arises from the fake code blocks, they add two extra lines to the mssage. Maybe we can remove the first one as second one should be enough to get the gist of the syntax. As for gist, hastebin etc. usage, we can add a line above available language names without issue, I think.

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

No branches or pull requests

2 participants