mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
docs: Capitalize Markdown consistently.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
60a25b2721
commit
768f9f93cd
@@ -17,7 +17,7 @@ from zerver.openapi.curl_param_value_generators import (
|
||||
|
||||
def test_generated_curl_examples_for_success(client: Client) -> None:
|
||||
authentication_line = f"{client.email}:{client.api_key}"
|
||||
# A limited markdown engine that just processes the code example syntax.
|
||||
# A limited Markdown engine that just processes the code example syntax.
|
||||
realm = get_realm("zulip")
|
||||
md_engine = markdown.Markdown(extensions=[markdown_extension.makeExtension(
|
||||
api_url=realm.uri + "/api")])
|
||||
@@ -29,13 +29,13 @@ def test_generated_curl_examples_for_success(client: Client) -> None:
|
||||
for file_name in sorted(glob.glob("templates/zerver/api/*.md")):
|
||||
documentation_lines = open(file_name).readlines()
|
||||
for line in documentation_lines:
|
||||
# A typical example from the markdown source looks like this:
|
||||
# A typical example from the Markdown source looks like this:
|
||||
# {generate_code_example(curl, ...}
|
||||
if not line.startswith("{generate_code_example(curl"):
|
||||
continue
|
||||
# To do an end-to-end test on the documentation examples
|
||||
# that will be actually shown to users, we use the
|
||||
# markdown rendering pipeline to compute the user-facing
|
||||
# Markdown rendering pipeline to compute the user-facing
|
||||
# example, and then run that to test it.
|
||||
curl_command_html = md_engine.convert(line.strip())
|
||||
unescaped_html = html.unescape(curl_command_html)
|
||||
|
||||
Reference in New Issue
Block a user