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

Automatically close code tags #170

Closed
joepie91 opened this issue Jun 8, 2015 · 6 comments
Closed

Automatically close code tags #170

joepie91 opened this issue Jun 8, 2015 · 6 comments
Milestone

Comments

@joepie91
Copy link

joepie91 commented Jun 8, 2015

When using ``` to open a block of code, it's easy to forget to close it again. It'd be helpful if a missing closing ``` would be automatically inserted upon sending a message.

@chrisidefix
Copy link

Also, it should be possible to quote in text like this == like this and you shouldn't have to start a new line for a block of code - that's just annoying!

This should be fine
This should be fine

@joepie91
Copy link
Author

joepie91 commented Jun 8, 2015

Potential complication; you need to be able to add a language directly after the code-block opening tags, for syntax highlighting. Not sure if that'd become a potential edge case in the no-newline scenario.

@chrisidefix
Copy link

I don't see any complications with that - it's a question of implementation. All you have to do is parse the text right after ``` and if it's a key-word (e.g. javascript) then just parse it as that (or do it the way github does and simply render it as code.

@esambo
Copy link

esambo commented Jun 9, 2015

I like the inline code syntax of Slack a lot. Fixed width font in red is great.
Syntax highlighting should be optional, even for:

code blocks
like this

GitHub renders it just fine right here!
Why not just use GitHubFlavoredMarkdown?

@joepie91
Copy link
Author

@esambo Isn't that already what Rocket.Chat is using anyway? The language specification method I described is from GitHub Markdown also.

@engelgabriel
Copy link
Member

Tested with js var a = b; window.alert('test');

and

var a = b;
window.alert('test');

or

even

window.alert('test');

@rodrigok rodrigok modified the milestone: v0.3 Jun 25, 2015
Peym4n pushed a commit to redlink-gmbh/Rocket.Chat that referenced this issue Jan 17, 2018
* Deactivate Request Closing Comments

* Deactivate closing comment for Live-Chat

* Create the swal config more nicely

* text translation and mergin object properties

* incl. setting to config role and roll back to using _ for object mergin

* minor naming adjustments
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

6 participants