Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [MAJOR] Updated to Storybook 10 with CSF3 format and MDX documentation
- [MINOR] Changed `ContainingView` to not make children automatically have `overflow: auto`
- [MINOR] Added `maxWidth` prop to `ContainingView`
- [MINOR] Added `shouldEnableHtmlParsing` to `Markdown`

### Removed

Expand Down
2 changes: 2 additions & 0 deletions src/molecules/markdown/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export interface IMarkdownProps {
extraOverrideComponents?: Record<string, React.ElementType>;
shouldForceWrapper?: boolean;
shouldForceBlock?: boolean;
shouldEnableHtmlParsing?: boolean;
}

export const Markdown = React.memo((props: IMarkdownProps): React.ReactElement => {
Expand All @@ -112,6 +113,7 @@ export const Markdown = React.memo((props: IMarkdownProps): React.ReactElement =
options={{
forceWrapper: props.shouldForceWrapper,
forceBlock: props.shouldForceBlock ?? true,
disableParsingRawHTML: !props.shouldEnableHtmlParsing,
wrapper: 'span',
overrides: {
a: { component: MarkdownLink },
Expand Down
1 change: 1 addition & 0 deletions src/molecules/markdownText/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const MarkdownText = React.memo((props: IMarkdownTextProps): React.ReactE
<MarkdownToJsx
options={{
forceWrapper: true,
disableParsingRawHTML: true,
wrapper: React.Fragment,
Comment on lines 41 to 45
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting disableParsingRawHTML: true here breaks the existing newline handling logic, since content is built using literal <br/> tags (see the source.replace call above) and markdown-to-jsx will now render those as plain text rather than line breaks. To preserve the current visual behavior while disabling raw HTML, the newline transformation should be updated to avoid injecting <br/> (e.g. rely only on markdown line-break syntax or another non-HTML approach) so that the WithNewlines story and other multiline content do not show raw <br/> characters in the UI.

Copilot uses AI. Check for mistakes.
overrides: {
a: {
Expand Down
Loading