Skip to content

Commit

Permalink
Rename scratchblocks options
Browse files Browse the repository at this point in the history
  • Loading branch information
adroitwhiz authored and towerofnix committed Dec 16, 2023
1 parent 9841f60 commit a0883e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/io/scratchblocks/toScratchblocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ export interface ToScratchblocksOptions {

export default function toScratchblocks(
project: Project,
options: Partial<ToScratchblocksOptions> = {}
inOptions: Partial<ToScratchblocksOptions> = {}
): {
[targetName: string]: string;
} {
const defaultOptions: ToScratchblocksOptions = {
indent: "\t"
};
const fullOptions = { ...defaultOptions, ...options };
const options = { ...defaultOptions, ...inOptions };

function indent(str: string): string {
return str
.split("\n")
.map(l => fullOptions.indent + l)
.map(l => options.indent + l)
.join("\n");
}

Expand Down

0 comments on commit a0883e9

Please sign in to comment.