diff --git a/.changeset/olive-mice-hide.md b/.changeset/olive-mice-hide.md new file mode 100644 index 00000000000..2606c7cae1c --- /dev/null +++ b/.changeset/olive-mice-hide.md @@ -0,0 +1,6 @@ +--- +'graphiql': patch +'@graphiql/react': patch +--- + +Respect Markdown format: ignore single newline diff --git a/packages/graphiql-react/src/markdown.ts b/packages/graphiql-react/src/markdown.ts index 9386e370973..1e26795a8c1 100644 --- a/packages/graphiql-react/src/markdown.ts +++ b/packages/graphiql-react/src/markdown.ts @@ -1,6 +1,8 @@ import MarkdownIt from 'markdown-it'; export const markdown = new MarkdownIt({ - breaks: true, + // we don't want to convert \n to
because in markdown a single newline is not a line break + // https://github.com/graphql/graphiql/issues/3155 + breaks: false, linkify: true, });