Skip to content

Commit

Permalink
Fix regex to keep leading spaces on code output
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-heyer committed Nov 2, 2023
1 parent 77eae60 commit 9fbee13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/code-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const splitChildrenIntoCodeAndOutput = (rawChildren) => {
return [[], []];
}

const splitRegex = /(?:\s+|^)__OUTPUT__(?:\s+|$)/;
const splitRegex = /(?:\s+|^)__OUTPUT__\s*(?:\n+|$)/;
const code = [];
const output = [];

Expand Down

2 comments on commit 9fbee13

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://6543e539e3ecb337223ee1b7--edb-docs.netlify.app

Please sign in to comment.