You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/style-guide/components/markdown.mdx
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,4 +18,27 @@ If you have a variable that needs to be formatted in any special way (for exampl
18
18
<Markdowntext={props.foo} />
19
19
```
20
20
21
-
Note that you need to wrap your variable in curly braces, as well as use `text=` or this will not work.
21
+
Note that you need to wrap your variable in curly braces, as well as use `text=` or this will not work.
22
+
23
+
## Multi-line strings
24
+
25
+
The Markdown component uses the [`dedent`](https://www.npmjs.com/package/dedent) library to remove indentation from multi-line strings.
26
+
27
+
This is because the [Commonmark spec](https://spec.commonmark.org/0.22/#indented-code-blocks) treats indented text as code blocks, unlike [MDX](https://mdxjs.com/docs/what-is-mdx/#:~:text=Indented%20code%20does%20not%20work%20in%20MDX%3A).
28
+
29
+
```mdx live
30
+
import { Markdown } from"~/components";
31
+
32
+
<>
33
+
<Markdown
34
+
text={`
35
+
You need to purchase [Magic WAN](https://www.cloudflare.com/magic-wan/) before you can purchase and use the Magic WAN Connector. The Magic WAN Connector can function as your primary edge device for your network, or be deployed in-line with existing network gear.
36
+
37
+
You also need to purchase a Magic WAN Connector before you can start configuring your settings in the Cloudflare dashboard. After buying a Magic WAN Connector, the device will be registered with your Cloudflare account and show up in your Cloudflare dashboard.
38
+
39
+
Contact your account representative to learn more about purchasing options for the Magic WAN Connector device.
0 commit comments