Skip to content

Instantly share code, notes, and snippets.

@dlebech
Last active January 17, 2024 10:34
Show Gist options
  • Star 50 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dlebech/62b69ee7c9fdb53c63a6 to your computer and use it in GitHub Desktop.
Save dlebech/62b69ee7c9fdb53c63a6 to your computer and use it in GitHub Desktop.
Comment formatting in Gerrit
The documentation for Gerrit when it comes to formatting comments is quite lacking. Here is short list created by trial and error and looking at the source code in:
./gerrit-gwtexpui/src/main/java/com/google/gwtexpui/safehtml/client/SafeHtml.java
Lists:
* List item 1
* List item 2
- List item 1
- List item 2
Block quote:
> This will turn into a block quote.
> This will also turn into a block quote.
Code blocks:
This will become a code block because it has a leading space.
This will become a code block because there is a newline and a space on the next line.
Do you notice the leading space?
This line should also become a code block
because it uses tabs. But who does that?
That's it. Someone should create a markdown plugin :-)
@edanilenko
Copy link

strike

@arch-daemone
Copy link

@edanilenko ...

Are you requesting strikethrough? Telling us it can be added but not telling us how? If the former, I'm pretty sure @dlebech isn't involved in making Gerrit, otherwise he wouldn't need "trial and error and looking at the source code". If the latter, well... that's just mean.

@lucaswerkmeister
Copy link

That's it. Someone should create a markdown plugin :-)

Better yet: CommonMark ;)

@Jimilian
Copy link

Jimilian commented Jan 24, 2018

Also nowadays you can use emojis everywhere (except GitHub comments). Even if you are using Jenkins and Gerrit Trigger Plugin to send feedback from CI (i.e. add ❌ to Build failed message)

@akcrono
Copy link

akcrono commented Feb 21, 2020

Code blocks don't work

@ssbarnea
Copy link

I think first step would be to star and comment on https://bugs.chromium.org/p/gerrit/issues/detail?id=9299 ticket if we want this to ever become a reality.

@Ammarpad
Copy link

Ammarpad commented Jan 8, 2021

Just found myself here after frustration that I cannot format long url for nice display in comment

@torbatamas
Copy link

Just found myself here after frustration that I cannot format long url for nice display in comment

+1

@RexGibson
Copy link

+1

@aydinugur
Copy link

Just found myself here after frustration that I cannot format long url for nice display in comment

+1

+1

@fodil-a
Copy link

fodil-a commented Oct 13, 2021

@marslo
Copy link

marslo commented Sep 28, 2022

Code blocks don't work

+1

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