Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Inline code spans are not blocks.

Anders Kaseorg66ad6a45836d
diff --git a/templates/zerver/help/code-blocks.md b/templates/zerver/help/code-blocks.md
index 4d337aecdff..6a0f9446406 100644
--- a/templates/zerver/help/code-blocks.md
+++ b/templates/zerver/help/code-blocks.md
@@ -1,10 +1,10 @@
-# Code blocks
+# Code spans and blocks
-Zulip supports the standard [Markdown syntax][markdown] for code
-blocks:
+Zulip supports the standard [Markdown syntax][markdown] for inline
+code spans and code blocks:
~~~
-Inline: `let x = 5`
+Inline code span: `let x = 5`
Code block:
```
@@ -24,7 +24,7 @@ Sending the above message in Zulip will render like this:
![Markdown code](/static/images/help/markdown-code.png)
-You can also use `~~~` to start codeblocks, or just indent the code 4 or more
+You can also use `~~~` to start code blocks, or just indent the code 4 or more
spaces.
A widget in the upper-right corner of code blocks allows you to easily
diff --git a/templates/zerver/help/format-your-message-using-markdown.md b/templates/zerver/help/format-your-message-using-markdown.md
index dda1aed42f2..07ae85a9335 100644
--- a/templates/zerver/help/format-your-message-using-markdown.md
+++ b/templates/zerver/help/format-your-message-using-markdown.md
@@ -1,7 +1,7 @@
# Format your messages
[//]: # (All screenshots here require line-height: 22px and font-size: 16px in .message-content.)
-[//]: # (Requires some additional fiddling for the LaTeX picture, inline code block, and maybe a few others.)
+[//]: # (Requires some additional fiddling for the LaTeX picture, inline code span, and maybe a few others.)
Zulip uses a variant of
[GitHub Flavored Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet)
@@ -107,7 +107,7 @@ def fib(n):
![Markdown code](/static/images/help/markdown-code.png)
-You can also use `~~~` to start codeblocks, or just indent the code 4 or more spaces.
+You can also use `~~~` to start code blocks, or just indent the code 4 or more spaces.
See the main [code blocks article](/help/code-blocks) for details on
[syntax highlighting](/help/code-blocks#language-tagging), [code
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index 5e6b247d2e8..caec1639f14 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -567,7 +567,7 @@ class BacktickInlineProcessor(markdown.inlinepatterns.BacktickInlineProcessor):
# Let upstream's implementation do its job as it is, we'll
# just replace the text to not strip the group because it
# makes it impossible to put leading/trailing whitespace in
- # an inline code block.
+ # an inline code span.
el, start, end = ret = super().handleMatch(m, data)
if el is not None and m.group(3):
# upstream's code here is: m.group(3).strip() rather than m.group(3).