Skip to content

Commit 6a993ea

Browse files
author
Gerard Brull
committed
Update snapshots
1 parent 8c23797 commit 6a993ea

File tree

4 files changed

+6
-18
lines changed

4 files changed

+6
-18
lines changed

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/loaders/utils/__tests__/__snapshots__/chunkify.spec.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Array [
9191
Object {
9292
"content": "# Header
9393
94-
Text with _some_ **formatting** and a [link](/foo).
94+
Text with *some* **formatting** and a [link](/foo).
9595
9696
<div>And some HTML.</div>
9797

src/loaders/utils/__tests__/noAutoLinkRemarkPlugin.spec.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import remark from 'remark';
22
import noAutoLink from '../noAutoLinkRemarkPlugin';
33

4-
const transform = (markdown: string) =>
5-
remark()
6-
.use(noAutoLink)
7-
.processSync(markdown)
8-
.toString();
4+
const transform = (markdown: string) => remark().use(noAutoLink).processSync(markdown).toString();
95

10-
it('should convert URLs to auto links', () => {
6+
it('should not convert URLs to auto links', () => {
117
const markdown = 'http://example.com';
128
const result = transform(markdown);
13-
expect(result.trim()).toBe('[http://example.com](http://example.com "http&#x3A;//example.com")');
9+
expect(result.trim()).toBe('http://example.com');
1410
});
1511

1612
it('should keep full links as is', () => {

src/loaders/utils/chunkify.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,11 @@ export default function chunkify(
6363
};
6464
}
6565

66-
const rendered = remark()
67-
.use(processCode)
68-
.processSync(markdown)
69-
.toString();
66+
const rendered = remark().use(processCode).processSync(markdown).toString();
7067

7168
const chunks: (Rsg.CodeExample | Rsg.MarkdownExample)[] = [];
7269
const textChunks = rendered.split(CODE_PLACEHOLDER);
73-
textChunks.forEach(chunk => {
70+
textChunks.forEach((chunk) => {
7471
chunk = chunk.trim();
7572
if (chunk) {
7673
chunks.push({

0 commit comments

Comments
 (0)