Skip to content

Commit 80a8bcc

Browse files
committed
clarify explanation and add better example
1 parent 27da314 commit 80a8bcc

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

fern/products/docs/pages/component-library/writing-content/markdown-media.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,23 @@ $$
187187
\,d\xi
188188
$$
189189

190-
### Escaping dollar signs
190+
### Displaying literal dollar signs
191191

192-
Text between two dollar signs is rendered as a LaTeX equation. For example, `$10 this is sample text $20` renders as $10 this is sample text $20. To display dollar signs as literal text, escape them with a backslash: `\$10 this is sample text \$20` renders as \$10 this is sample text \$20.
192+
Since dollar signs trigger LaTeX rendering, text containing dollar amounts may accidentally render as math equations. To display literal dollar signs in your documentation (like prices, budgets, costs, or financial data), escape them with a backslash (`\`):
193+
194+
<div className="highlight-frame">
195+
<div className="highlight-frame-content">
196+
Without escaping: The product costs $10 and shipping is $5
197+
198+
With escaping: The product costs \$10 and shipping is \$5
199+
</div>
200+
</div>
201+
202+
203+
```markdown Markdown wordWrap
204+
Without escaping: The product costs $10 and shipping is $5
205+
With escaping: The product costs \$10 and shipping is \$5
206+
```
193207

194208
## Diagrams
195209
Fern supports creating diagrams within your Markdown using [Mermaid](https://mermaid.js.org/). Mermaid offers a variety of diagrams, including flowcharts, entity-relationship models, and Gantt charts. To include a Mermaid diagram in your Markdown file, create a codeblock marked with `mermaid`.

0 commit comments

Comments
 (0)