Skip to content

fix: spell. "identation" → "indentation " #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@

### Bug Fixes

- remove extra identation for sass content ([7d0f437](https://github.com/kaisermann/svelte-preprocess/commit/7d0f4376037d1ff6b426e2d6882adb6b08d95464))
- remove extra indentation for sass content ([7d0f437](https://github.com/kaisermann/svelte-preprocess/commit/7d0f4376037d1ff6b426e2d6882adb6b08d95464))

## [3.9.9](https://github.com/kaisermann/svelte-preprocess/compare/v3.9.7...v3.9.9) (2020-06-19)

Expand Down
8 changes: 4 additions & 4 deletions src/transformers/pug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import pug from 'pug';
import type { Transformer, Options } from '../types';

// Mixins to use svelte template features
const GET_MIXINS = (identationType: 'tab' | 'space') =>
const GET_MIXINS = (indentationType: 'tab' | 'space') =>
`mixin if(condition)
%_| {#if !{condition}}
%_block
Expand Down Expand Up @@ -50,7 +50,7 @@ mixin const(expression)
mixin debug(variables)
%_| {@debug !{variables}}`.replace(
/%_/g,
identationType === 'tab' ? '\t' : ' ',
indentationType === 'tab' ? '\t' : ' ',
);

const transformer: Transformer<Options.Pug> = async ({
Expand All @@ -67,8 +67,8 @@ const transformer: Transformer<Options.Pug> = async ({
...options,
};

const { type: identationType } = detectIndent(content);
const input = `${GET_MIXINS(identationType ?? 'space')}\n${content}`;
const { type: indentationType } = detectIndent(content);
const input = `${GET_MIXINS(indentationType ?? 'space')}\n${content}`;
const compiled = pug.compile(
input,
pugOptions,
Expand Down