From 912d1d819c5e6bfba7412c72563f769fcc1e814c Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 4 Sep 2025 03:17:11 +0000 Subject: [PATCH] help: Remove incorrect brace escaping. --- .../content/docs/add-a-custom-linkifier.mdx | 34 +++++++++---------- .../src/content/docs/code-blocks.mdx | 18 +++++----- .../src/content/docs/saml-authentication.mdx | 10 +++--- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/starlight_help/src/content/docs/add-a-custom-linkifier.mdx b/starlight_help/src/content/docs/add-a-custom-linkifier.mdx index 4c046df94f..74d7978f94 100644 --- a/starlight_help/src/content/docs/add-a-custom-linkifier.mdx +++ b/starlight_help/src/content/docs/add-a-custom-linkifier.mdx @@ -82,7 +82,7 @@ used to link to issues or tickets in third party issue trackers, like GitHub, Salesforce, Zendesk, and others. * Pattern: `#(?P[0-9]+)` -* URL template: `https://github.com/zulip/zulip/issues/\{id\}` +* URL template: `https://github.com/zulip/zulip/issues/{id}` * Original text: `#2468` * Automatically links to: `https://github.com/zulip/zulip/issues/2468` @@ -96,7 +96,7 @@ variants. For example, the Zulip development community `#D2468` and issue in the desktop app repository, etc. * Pattern: `#F(?P[0-9]+)` -* URL template: `https://github.com/zulip/zulip-flutter/issues/\{id\}` +* URL template: `https://github.com/zulip/zulip-flutter/issues/{id}` * Original text: `#F245` * Automatically links to: `https://github.com/zulip/zulip-flutter/issues/245` @@ -106,7 +106,7 @@ For organizations that commonly link to multiple GitHub repositories, this linkfier pattern turns `org/repo#ID` into an issue or pull request link. * Pattern: `(?P[a-zA-Z0-9_-]+)/(?P[a-zA-Z0-9_-]+)#(?P[0-9]+)` -* URL template: `https://github.com/\{org\}/\{repo\}/issues/\{id\}` +* URL template: `https://github.com/{org}/{repo}/issues/{id}` * Original text: `zulip/zulip#2468` * Automatically links to: `https://github.com/zulip/zulip/issues/2468` @@ -115,8 +115,8 @@ linkfier pattern turns `org/repo#ID` into an issue or pull request link. The following pattern linkfies a string of hexadecimal digits between 7 and 40 characters long, such as a Git commit ID. -* Pattern: `(?P[0-9a-f]\{7,40\})` -* URL template: `https://github.com/zulip/zulip/commit/\{id\}` +* Pattern: `(?P[0-9a-f]{7,40})` +* URL template: `https://github.com/zulip/zulip/commit/{id}` * Original text: `abdc123` * Automatically links to: `https://github.com/zulip/zulip/commit/abcd123` @@ -129,15 +129,15 @@ engine. Linkifiers use [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html) compliant URL templates to describe how links should be generated. These templates support -several expression types. The default expression type (`\{var\}`) will URL-encode +several expression types. The default expression type (`{var}`) will URL-encode special characters like `/` and `&`; this behavior is desired for the vast majority of linkifiers. Fancier URL template expression types can allow you to get the exact behavior you want in corner cases like optional URL query parameters. For example: -* Use `\{+var\}` when you want URL delimiter characters to not be URL-encoded. -* Use `\{?var\}` and `\{&var\}` for variables in URL query parameters. -* Use \{#var} when generating `#` fragments in URLs. +* Use `{+var}` when you want URL delimiter characters to not be URL-encoded. +* Use `{?var}` and `{&var}` for variables in URL query parameters. +* Use `{#var}` when generating `#` fragments in URLs. The URL template specification has [brief examples](https://www.rfc-editor.org/rfc/rfc6570.html#section-1.2) and [detailed @@ -150,13 +150,13 @@ This example pattern is a shorthand for linking to pages on Zulip's ReadTheDocs site. * Pattern: `RTD/(?P
[a-zA-Z0-9_/.#-]+)` -* URL template: `https://zulip.readthedocs.io/en/latest/\{+article\}` +* URL template: `https://zulip.readthedocs.io/en/latest/{+article}` * Original text: `RTD/overview/changelog.html` * Automatically links to: `https://zulip.readthedocs.io/en/latest/overview/changelog.html` - This pattern uses the `\{+var\}` expression type. With the - default expression type (`\{article\}`), the `/` between `overview` and + This pattern uses the `{+var}` expression type. With the + default expression type (`{article}`), the `/` between `overview` and `changelog` would incorrectly be URL-encoded. @@ -165,13 +165,13 @@ site. This example pattern allows linking to Google searches. * Pattern: `google:(?P\w+)?` -* URL template: `https://google.com/search\{?q\}` +* URL template: `https://google.com/search{?q}` * Original text: `google:foo` or `google:` * Automatically links to: `https://google.com/search?q=foo` or `https://google.com/search` - This pattern uses the `\{?var\}` expression type. With the default expression - type (`\{q\}`), there would be no way to only include the `?` in the URL + This pattern uses the `{?var}` expression type. With the default expression + type (`{q}`), there would be no way to only include the `?` in the URL if the optional `q` is present. @@ -185,10 +185,10 @@ interest (`django/django`) that is in a different organization. * Specific linkifier (ordered before the general linkifier) * Pattern: `django#(?P[0-9]+)` - * URL template: `https://github.com/django/django/pull/\{id\}` + * URL template: `https://github.com/django/django/pull/{id}` * General linkifier * Pattern: `(?P[a-zA-Z0-9_-]+)#(?P[0-9]+)` - * URL template: `https://github.com/zulip/\{repo\}/pull/\{id\}` + * URL template: `https://github.com/zulip/{repo}/pull/{id}` * Example matching both linkifiers; specific linkifier takes precedence: * Original text: `django#123` * Automatically links to: `https://github.com/django/django/pull/123` diff --git a/starlight_help/src/content/docs/code-blocks.mdx b/starlight_help/src/content/docs/code-blocks.mdx index a31c4642fe..1bbc850d16 100644 --- a/starlight_help/src/content/docs/code-blocks.mdx +++ b/starlight_help/src/content/docs/code-blocks.mdx @@ -134,7 +134,7 @@ on hover that allows you to open the code block in the code playground site. For example, to configure code a playground for Rust, you could specify the -language and URL template as `Rust` and `https://play.rust-lang.org/?code=\{code\}`. +language and URL template as `Rust` and `https://play.rust-lang.org/?code={code}`. When a code block is labeled as `rust` (either explicitly or by organization default), users would get an on-hover option to open the code block in the @@ -144,7 +144,7 @@ specified code playground. Code playgrounds use [RFC 6570](https://www.rfc-editor.org/rfc/rfc6570.html) compliant URL templates to describe how links should be generated. Zulip's rendering engine will pass the URL-encoded code from the code block as the - `code` parameter, denoted as `\{code\}` in this URL template, in order to + `code` parameter, denoted as `{code}` in this URL template, in order to generate the URL. You can refer to parts of the documentation on URL templates from [adding a custom linkifier](/help/add-a-custom-linkifier). @@ -154,13 +154,13 @@ specified code playground. Here is a list of playground URL templates you can use for some popular languages: -* For Java: `https://pythontutor.com/java.html#code=\{code\}` or - `https://cscircles.cemc.uwaterloo.ca/java_visualize/#code=\{code\}` -* For JavaScript: `https://pythontutor.com/javascript.html#code=\{code\}` -* For Python: `https://pythontutor.com/python-compiler.html#code=\{code\}` -* For C: `https://pythontutor.com/c.html#code=\{code\}` -* For C++: `https://pythontutor.com/cpp.html#code=\{code\}` -* For Rust: `https://play.rust-lang.org/?code=\{code\}` +* For Java: `https://pythontutor.com/java.html#code={code}` or + `https://cscircles.cemc.uwaterloo.ca/java_visualize/#code={code}` +* For JavaScript: `https://pythontutor.com/javascript.html#code={code}` +* For Python: `https://pythontutor.com/python-compiler.html#code={code}` +* For C: `https://pythontutor.com/c.html#code={code}` +* For C++: `https://pythontutor.com/cpp.html#code={code}` +* For Rust: `https://play.rust-lang.org/?code={code}` ### Technical details diff --git a/starlight_help/src/content/docs/saml-authentication.mdx b/starlight_help/src/content/docs/saml-authentication.mdx index 68016fa377..3a7511a181 100644 --- a/starlight_help/src/content/docs/saml-authentication.mdx +++ b/starlight_help/src/content/docs/saml-authentication.mdx @@ -110,7 +110,7 @@ providers. * **Reply URL (Assertion Consumer Service URL)**: `https://auth.zulipchat.com/complete/saml/` 1. If you want to set up IdP-initiated sign on, in the **Basic SAML Configuration** section, also specify: - * **RelayState**: `\{"subdomain": ""\}` + * **RelayState**: `{"subdomain": ""}` 1. Check the **User Attributes & Claims** configuration, which should already be set to the following. If the configuration is different, please indicate this when contacting [support@zulip.com](mailto:support@zulip.com) @@ -183,15 +183,15 @@ providers. `https://auth.zulipchat.com/complete/saml/`. 1. Edit the **Settings** section to match: ``` - \{ + { "audience": "https://zulipchat.com", - "mappings": \{ + "mappings": { "email": "email", "given_name": "first_name", "family_name": "last_name" - \}, + }, "binding": "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" - \} + } ``` 1. * Your organization's URL