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

__construct underline #129

Open
HBIDamian opened this issue Aug 23, 2022 · 3 comments
Open

__construct underline #129

HBIDamian opened this issue Aug 23, 2022 · 3 comments

Comments

@HBIDamian
Copy link
Contributor

In the example below, their message included:

 #8 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)

image

Due to __ on each side of characters, it causes discord's formatting to escape.

@SOF3
Copy link
Owner

SOF3 commented Aug 23, 2022

can be fixed by replacing all _ with \_. Want to send a PR?

@HBIDamian
Copy link
Contributor Author

I'm unfamiliar with the code, and Co-pilot ran out. So I'll leave it to you. 😂

@SOF3
Copy link
Owner

SOF3 commented Aug 24, 2022

I'm unfamiliar with the code, and Co-pilot ran out. So I'll leave it to you. 😂

@HBIDamian I think we have to change this to a new parameter

{}

then duplicate this parameter with a replace call
code.split('\n')

using this method: https://doc.rust-lang.org/stable/std/primitive.str.html#method.replace

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

No branches or pull requests

2 participants