Skip to content

Commit bc496d4

Browse files
authored
feat: render markdown content urls as links (#1885)
1 parent 9442058 commit bc496d4

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/graphiql/src/components/DocExplorer/MarkdownContent.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import React from 'react';
99
import MD from 'markdown-it';
1010
import { Maybe } from '../../types';
1111

12-
const md = new MD();
12+
const md = new MD({
13+
// render urls as links, à la github-flavored markdown
14+
linkify: true,
15+
});
1316

1417
type MarkdownContentProps = {
1518
markdown?: Maybe<string>;

packages/graphiql/test/schema.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ const TestMutationType = new GraphQLObjectType({
321321

322322
const TestSubscriptionType = new GraphQLObjectType({
323323
name: 'SubscriptionType',
324-
description: 'This is a simple subscription type',
324+
description:
325+
'This is a simple subscription type. Learn more at https://graphql.org/blog/subscriptions-in-graphql-and-relay/',
325326
fields: {
326327
subscribeToTest: {
327328
type: TestType,

0 commit comments

Comments
 (0)