docs: Inline code spans are not blocks.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-09-07 14:45:15 -07:00
committed by Anders Kaseorg
parent 3845ac2b56
commit 66ad6a4583
3 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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).