Closed leolabs closed 1 year ago
Also, support for GitHub's Markdown would be a wise feature.
Code highlighting, or at least tabulation, would be awesome
The thing is, highlighted code doesn't have to be a new message format like images or videos as it's also just text. It could be marked like code in GitHub flavoured Markdown using three backticks or something like that.
or just by using some library that detects most common programming structures, there is probably some library made to detect code inserted between text
I'll also appreciate this !
code here
will be a nice addition
I like the idea. I'm waiting for later versions of Telegram to see whether I need Kik Messenger installed on my phone or not. Please keep doing well developers.
I absolutely agree. Syntax highlighting is very useful thing
I disagree about automatic mode. Should be some markup language like [code]int main()...[/code] instead of automatic to avoid bugs and excessive CPU consumption on parsing messages.
Nice Feature, Like that ;)
I would love that support! A markdown support as in GitHub or on HabitRPG's chat would solve well the problem about a non-dev sending a sample message and te app reading it as source code.
I know telegram is a mobile-first application, but we already have this kind of functionality in other chat tools like slack that use it in both mobile and desktop implementation. This kind of markdown language would really help telegram to be adopted by technical teams on internal communication. I am trying to convince my team to replace slack and skype by telegram and this feature would help me a lot on this task! Keep doing this great work!
@GreatMedivack you just had to be different to everone else :arrow_up:
+1 from me and +1 from my cat
What would be the best way to handle this? Slack does code highlighting, but its not markdown style, rather code upload. UX matters too.
+1 for the same system as Github, backticks with the language code behind, would be super useful
This was implemented, check this out:
Inline `code` has `back-ticks around` it.
```
var s = "Block highlighting";
alert(s);
```
This is just the monospace, not Syntax-Highlight. And if a line have more than 51 characters, it breaks the line (if was even the 80 chars i would understand...but why 51?). And the mobile still not working well. If the feature is already implemented, it need some improves.
+1 highlight syntax like in gitter
It's worth noting that it's now possible to format code blocks by using the @bold
bot which accepts markdown.
@joeldrapper @bold
didn't support syntax highlighting and use word breaking to separate line. It's makes code more unreadable if you send some example to man for showing some example, it's hard to read and still better sending code with pastebin. It's needs horizontal scroll at minimum, but i don't know, support it's telegram or not.
@Niklan Currently TDesktop does not support horizontal scroll in messages layout :(
Has no way to embed Pastebins links? However, a native option will be great.
If inline-bot is the preferred ways for bold & italic... then we will probably have to resort to inline-bot for this "programmer only" case?
@lawrencegs Could be inline-bots a way to do this, but the API don't have a implement to modify colors in text. It has only a simple markdown.
I love the ``` block and I use it a lot, but syntax highlighting will be a new level.
Well, I'm upping this since it would be really lovely and useful :+1:
@Niklan Indeed, we need resizable chat width at least. I commented about it here: https://github.com/telegramdesktop/tdesktop/issues/1634#issuecomment-194929183
Use the new reactions of GitHub on the first entry of this issue instead of creating unnecessary +1
comments.
Reactions aren't available in mobile site yet.
@stek29 I know - but you can easily switch to the desktop version.
With this feature, I will change hipchat for telegram desktop directly!
Only that feature stops from using telegram on work.
We want to change skype/hipchat/hangout on work for telegram desktop :8ball:
We're waiting for this feature too! For now we've built a small bot which replies with rtf
files. Looks convenient for mobile preview:
https://telegram.me/pastemebot
It works in inline mode too replying with urls for rtf
files.
Really hoping to see support for code snippets with syntax highlighting. Even better if Telegram would allow centralised viewing of all code snippets via the "Shared Media" viewer.
hmm...'shared code' inside media section - great idea. too great to be implemented 😄
LaTeX would be awesome to see available.
I think code must be like media files with little preview or just name and some meta info, but on click opens in new modal window with syntax highlighting. Also would be great if we can edit it and resend edited version after that.
At least here in Brazil, many developers uses Telegram so is very useful this feature 😇
--
Theus Falcão Sent by Gmail Mobile
+999
Nicaragua, from centroAmerica, we like this
This would be nice
```php
class StreamsServiceProvider extends ServiceProvider
{
use DispatchesJobs;
protected $schedule = [];
}
```
Any progress on this? If not, is there any opposition?
I suppose, they just don't want to be the best messenger for programmers :)
Come on, developers! It's not that hard to implement!
If you are scared it might mess up with non-programmer users, just make some obscure rules to enable it, prefixes, etc., we won't mind :)
But, don't forget guys, there are some more serious problems. For example, Telegram, could be blocked in Russia soon, and so on...
That's interesting, could the community start such project based on inline bot? I had seen few implementations, but they are not enough convenient for everyday use.
Thoughts? Community! ))
If you are scared it might mess up with non-programmer users, just make some obscure rules to enable it, prefixes, etc., we won't mind :)
What? It's already done through use of code blocks. I'm talking about formatting, not highlighting. And it doesn't mess anything up for non-programmers. Or are talking about autodetection? I hope not, as it's very bad idea.
That's interesting, could the community start such project based on inline bot?
Nah. Inline bots are confusing. Should just have clear rules for formatting/highlighting.
Formatting is not so clear, so it could be. I mean, if you would write ```
multiline block, it would transform your code to many lines limited by ` sign.
It's not fully useful for some cases.
Highlighting that what we talk above.
Inline bots... Unfortunately, you are right. ((( This is weird thing. But, as I think, the problem is deeper, some low level problem, like the shell which not supports coloring? Correct me, please if I'm wrong.
But, don't forget guys, there are some more serious problems. For example, Telegram, could be blocked in Russia soon, and so on...
Not our problem :)
What? It's already done through use of code blocks. I'm talking about formatting, not highlighting. And it doesn't mess anything up for non-programmers. Or are talking about autodetection? I hope not, as it's very bad idea.
I am trying to come up with some reason why this is not yet implemented. So I hypothesized that maybe they are worried that autodetection could affect regular users, but I agree with you ofc, that such fears are missplaced.
It would be great if we were able to send code snippets via Telegram in a way that is nicely readable by the receiver. I'm chatting a lot with other developers and often, I feel the need for such a feature.
Related issue on the Telegram bug tracker: https://bugs.telegram.org/c/824