Skip to content

Commit

Permalink
Whitespace in docs code snippets (#7356)
Browse files Browse the repository at this point in the history
Fixes #7330

Co-authored-by: John Doe <johndoe@example.com>
  • Loading branch information
Loldator and John Doe authored Oct 22, 2022
1 parent 8e9d1a6 commit 9102bc0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/kit/scripts/extract-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,15 @@ function get_types(code, statements) {
const i = code.indexOf('export', start);
start = i + 6;

const snippet = prettier.format(code.slice(start, statement.end).trim(), {
parser: 'typescript',
printWidth: 80,
useTabs: true,
singleQuote: true,
trailingComma: 'none'
});
const snippet = prettier
.format(code.slice(start, statement.end), {
parser: 'typescript',
printWidth: 80,
useTabs: true,
singleQuote: true,
trailingComma: 'none'
})
.trim();

const collection =
ts.isVariableStatement(statement) || ts.isFunctionDeclaration(statement)
Expand Down

0 comments on commit 9102bc0

Please sign in to comment.