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

Block code hides parts of the code #536

Closed
sanbor opened this issue Aug 21, 2015 · 7 comments
Closed

Block code hides parts of the code #536

sanbor opened this issue Aug 21, 2015 · 7 comments
Assignees
Milestone

Comments

@sanbor
Copy link

sanbor commented Aug 21, 2015

Post the following message: (three backticks)from .finance import (commission, slippage)(three backticks)

Observe how the word from dissapears when the message is posted.

@graywolf336
Copy link
Contributor

Here's a screenshot:
2015-08-21_12-34-06

@geekgonecrazy
Copy link
Contributor

Code snippet:

 ```from .finance import (commission, slippage)```

Just have to include a space in front here on github

@rodrigok
Copy link
Member

The first word after three backticks without spaces before is used as the language name to render the block.

Because this we have line breaks in the example below of the message field.
Single line quote must use a single backtick.

I will close this issue why this is the expected behavior, but if someone have any idea to improve this tell us and we will reopen the issue.

@graywolf336
Copy link
Contributor

An idea I just got for this to prevent the reported item is to detected if
there are any line breaks and if so then treat the first word as the
language otherwise treat it as a single line for format.
On Aug 21, 2015 7:06 PM, "Rodrigo Nascimento" [email protected]
wrote:

Closed #536 #536.


Reply to this email directly or view it on GitHub
#536 (comment).

@geekgonecrazy
Copy link
Contributor

That seems to be how github is handling this. If a single line it doesn't even try to check for a language.

@rodrigok
Copy link
Member

Very good solution :D

@rodrigok rodrigok reopened this Aug 22, 2015
@rodrigok rodrigok self-assigned this Aug 22, 2015
@rodrigok rodrigok added this to the v1.0 milestone Aug 22, 2015
@sanbor
Copy link
Author

sanbor commented Aug 25, 2015

I'd also add the case that if is not a valid language name, don't use it as language name.

Sometimes what I do is to type three backticks and paste a chunk of code, so maybe the first line is touching the three backticks. Github plays nice in this situation.

Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Apr 4, 2019
* Scripts for dedicated integrtion test execution

* Streamline message-popup-test and make it repetitive

* Remove language dependency in tests

* make searchChannel in tests more robust to caller's environment

* Fix tests which were relying on previous scripts' state

* Fix typo in shell scriptname

* Scripts for dedicated integrtion test execution
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

4 participants