Skip to content

Commit

Permalink
Redo fix from #28187
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh committed Mar 15, 2023
1 parent 1bc2402 commit 5335b49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
13 changes: 5 additions & 8 deletions packages/gazzodown/src/blocks/HeadingBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ const HeadingBlock = ({ children = [], level = 1 }: HeadingBlockProps): ReactEle
const HeadingTag = `h${level}` as const;

return (
<>
<HeadingTag style={{ display: 'inline-block' }}>
{children.map((block, index) => (
<PlainSpan key={index} text={block.value} />
))}
</HeadingTag>
<br />
</>
<HeadingTag>
{children.map((block, index) => (
<PlainSpan key={index} text={block.value} />
))}
</HeadingTag>
);
};

Expand Down
9 changes: 3 additions & 6 deletions packages/gazzodown/src/blocks/ParagraphBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ type ParagraphBlockProps = {
};

const ParagraphBlock = ({ children }: ParagraphBlockProps): ReactElement => (
<>
<p style={{ display: 'inline-block' }}>
<InlineElements children={children} />
</p>
<br />
</>
<div>
<InlineElements children={children} />
</div>
);

export default ParagraphBlock;

0 comments on commit 5335b49

Please sign in to comment.