trim content by default

This commit is contained in:
2023-11-16 15:43:48 +01:00
parent 7bb8db420f
commit a6c56e536a
6 changed files with 19 additions and 4 deletions

View File

@@ -34,7 +34,6 @@ exports[`base single import 1`] = `
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
"
`;
@@ -44,7 +43,6 @@ exports[`base multiple imports 1`] = `
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
<blockquote>
<p>This is some amazing quote</p>

View File

@@ -38,3 +38,13 @@ exports[`options empty options 1`] = `
</table>
"
`;
exports[`options do not trim 1`] = `
"<p>Here is a typescript snippet</p>
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
"
`;

View File

@@ -9,7 +9,6 @@ exports[`base import different files 1`] = `
<pre><code class="language-ts">export function sum(a: number, b: number): number {
return a + b
}
</code></pre>
"
`;

View File

@@ -30,4 +30,8 @@ describe('options', () => {
expect(() => render('matcher-a.md', { matcher })).toThrow('Regexp must expose a named group "file"')
})
})
test('do not trim', async () => {
expect(await render('whole.md', { trim: false })).toMatchSnapshot()
})
})