Skip to content

Commit

Permalink
Merge pull request #157 from balena-io-modules/markdown-allowed-compo…
Browse files Browse the repository at this point in the history
…nents

Markdown: Only allow elements that have been overriden
  • Loading branch information
myarmolinsky authored Dec 9, 2024
2 parents f37e60e + c2d69a5 commit 4dc8047
Show file tree
Hide file tree
Showing 6 changed files with 372 additions and 278 deletions.
168 changes: 0 additions & 168 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"react-helmet": "^6.1.0",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.10.0",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.0",
"rimraf": "^6.0.0",
"typescript": "^5.5.2",
Expand Down
40 changes: 36 additions & 4 deletions src/components/Markdown/Markdown.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,50 @@ export default meta;
type Story = StoryObj<typeof meta>;

const markdown = `
# Title
# Title 1
## SubTitle
## Title 2
### List:
### Title 3
- item 1
- item 2
- item 3
\`const test = "code block example";\`
1. item 1
1. item 2
1. item 3
Testing some \`inline code\` example.
\`\`\`
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
\`\`\`
---
[Markdown Cheat Sheet](https://www.markdownguide.org/cheat-sheet/)
**bold text**
*italicized text*
> Quote quote lorem ipsum
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
~~The world is flat.~~
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
`;

export const Default: Story = {
Expand Down
Loading

0 comments on commit 4dc8047

Please sign in to comment.