diff --git a/static/images/help/csharp-syntax.png b/static/images/help/csharp-syntax.png new file mode 100644 index 0000000000..69b8a9654e Binary files /dev/null and b/static/images/help/csharp-syntax.png differ diff --git a/static/images/help/javascript-syntax.png b/static/images/help/javascript-syntax.png index 9d72f18272..d2011881f5 100644 Binary files a/static/images/help/javascript-syntax.png and b/static/images/help/javascript-syntax.png differ diff --git a/static/images/help/python-syntax.png b/static/images/help/python-syntax.png index 7a815a1b7c..19aab5fbeb 100644 Binary files a/static/images/help/python-syntax.png and b/static/images/help/python-syntax.png differ diff --git a/static/images/help/rust-syntax.png b/static/images/help/rust-syntax.png new file mode 100644 index 0000000000..63b23e292e Binary files /dev/null and b/static/images/help/rust-syntax.png differ diff --git a/templates/zerver/help/format-your-message-using-markdown.md b/templates/zerver/help/format-your-message-using-markdown.md index f9868d9ed8..b3ab6a073c 100644 --- a/templates/zerver/help/format-your-message-using-markdown.md +++ b/templates/zerver/help/format-your-message-using-markdown.md @@ -110,20 +110,25 @@ You can surround a portion of code with `` ![Inline code](/static/images/help/inline-code-screenshot.png) -Multi-line blocks of code are either fenced by lines with `````` -three back-ticks`````` or indented with four -spaces. +Multi-line blocks of code are either fenced by lines with three back-ticks +(```) or indented with four spaces. ![No code syntax highlighting](/static/images/help/no-syntax.png) -In addition, to highlight language syntax, add the file extension of -the language (for example, Python would be **.py**) right after the -first set of back-ticks. +Zulip also supports syntax highlighting of multi-line code blocks using +[Pygments](http://pygments.org). To add syntax highlighting to a multi-line code +block, add the language's **first** +[Pygments short name](http://pygments.org/docs/lexers/) after the first set of +back-ticks. ![Python syntax highlighting](/static/images/help/python-syntax.png) ![JavaScript syntax highlighting](/static/images/help/javascript-syntax.png) +![Rust syntax highlighting](/static/images/help/rust-syntax.png) + +![C# syntax highlighting](/static/images/help/csharp-syntax.png) + ## Quotes To insert quotes, you can either add a greater-than symbol ```>``` and