fix(v2): remove Markdown syntax from excerpt (#2701)

* fix(v2): remove Markdown syntax from excerpt

* Update snapshots

* Use Remark

* Switch to own solution
This commit is contained in:
Alexey Pyltsyn 2020-05-18 14:57:03 +03:00 committed by GitHub
parent c7baa125e6
commit da0f865831
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 112 additions and 20 deletions

View file

@ -303,7 +303,7 @@ describe('versioned website', () => {
permalink: '/docs/next/foo/bar',
source: path.join('@site', routeBasePath, 'foo', 'bar.md'),
title: 'bar',
description: 'This is `next` version of bar.',
description: 'This is next version of bar.',
version: 'next',
sidebar: 'docs',
next: {
@ -316,7 +316,7 @@ describe('versioned website', () => {
permalink: '/docs/next/hello',
source: path.join('@site', routeBasePath, 'hello.md'),
title: 'hello',
description: 'Hello `next` !',
description: 'Hello next !',
version: 'next',
sidebar: 'docs',
previous: {
@ -334,7 +334,7 @@ describe('versioned website', () => {
'hello.md',
),
title: 'hello',
description: 'Hello `1.0.1` !',
description: 'Hello 1.0.1 !',
version: '1.0.1',
sidebar: 'version-1.0.1/docs',
previous: {
@ -354,7 +354,7 @@ describe('versioned website', () => {
),
title: 'baz',
description:
'Baz `1.0.0` ! This will be deleted in next subsequent versions.',
'Baz 1.0.0 ! This will be deleted in next subsequent versions.',
version: '1.0.0',
sidebar: 'version-1.0.0/docs',
next: {

View file

@ -84,7 +84,7 @@ describe('simple site', () => {
title: 'baz',
editUrl:
'https://github.com/facebook/docusaurus/edit/master/website/docs/foo/baz.md',
description: '## Images',
description: 'Images',
});
});
@ -228,7 +228,7 @@ describe('versioned site', () => {
permalink: '/docs/next/foo/bar',
source: path.join('@site', routeBasePath, sourceA),
title: 'bar',
description: 'This is `next` version of bar.',
description: 'This is next version of bar.',
version: 'next',
});
expect(dataB).toEqual({
@ -236,7 +236,7 @@ describe('versioned site', () => {
permalink: '/docs/next/hello',
source: path.join('@site', routeBasePath, sourceB),
title: 'hello',
description: 'Hello `next` !',
description: 'Hello next !',
version: 'next',
});
});
@ -286,7 +286,7 @@ describe('versioned site', () => {
permalink: '/docs/1.0.0/foo/bar',
source: path.join('@site', path.relative(siteDir, versionedDir), sourceA),
title: 'bar',
description: 'Bar `1.0.0` !',
description: 'Bar 1.0.0 !',
version: '1.0.0',
});
expect(dataB).toEqual({
@ -294,7 +294,7 @@ describe('versioned site', () => {
permalink: '/docs/1.0.0/hello',
source: path.join('@site', path.relative(siteDir, versionedDir), sourceB),
title: 'hello',
description: 'Hello `1.0.0` !',
description: 'Hello 1.0.0 !',
version: '1.0.0',
});
expect(dataC).toEqual({
@ -302,7 +302,7 @@ describe('versioned site', () => {
permalink: '/docs/foo/bar',
source: path.join('@site', path.relative(siteDir, versionedDir), sourceC),
title: 'bar',
description: 'Bar `1.0.1` !',
description: 'Bar 1.0.1 !',
version: '1.0.1',
});
expect(dataD).toEqual({
@ -310,7 +310,7 @@ describe('versioned site', () => {
permalink: '/docs/hello',
source: path.join('@site', path.relative(siteDir, versionedDir), sourceD),
title: 'hello',
description: 'Hello `1.0.1` !',
description: 'Hello 1.0.1 !',
version: '1.0.1',
});
});