google-hangouts

Is there a syntax to specify multiline code snippets in Google (Hangouts) Chat?


I would like something like the Markdown options (of SO?), where

four leading spaces makes it look like code
blocks have been written

Solution

  • Google (Hangouts) Chat only supports basic (not rich nor full Markdown) formatting. For your specific inquiry, use pairs of triple backticks, i.e.,

    ```
    Hello
    World
    ```
    

    For this and other formatting directives, see either the consumer help page (for end-users), or the format messages page (for developers) in Google's documentation.

    For those who are developers and want to build Google Chat apps/bots, I was part of the launch team back in 2018 and produced some video content to help you get started:

    Ensure you're either pasting plaintext or force plaintext with cmd/ctrl + shift + v (see comments below).