Skip to content

Commit 95a8be9

Browse files
authored
fix markdown snippet docs (#869)
1 parent 8b6a823 commit 95a8be9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

fern/assets/styles.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,4 +1087,10 @@ a[href*="changelog"] svg {
10871087
display: inline-block;
10881088
}
10891089

1090-
/*** END -- LANDING PAGE STYLING ***/
1090+
/*** END -- LANDING PAGE STYLING ***/
1091+
1092+
/* HACK: add a slash to markdown snippet documentation (otherwise it gets parsed by CLI) */
1093+
.modify-snippet tbody tr:last-of-type td:last-of-type .line span:last-of-type:before {
1094+
content: "/";
1095+
display: inline-block;
1096+
}

fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ To use a snippet in your documentation, reference it by its file path (including
3434

3535
<Tabs>
3636
<Tab title="Markdown">
37-
37+
<div className="modify-snippet">
3838
```jsx
3939
Peace lilies are easy to grow and relatively trouble-free.
4040

4141
<Markdown src="/snippets/peace-lily.mdx">
4242
```
43+
</div>
4344

4445
</Tab>
4546
<Tab title="Preview">

0 commit comments

Comments
 (0)