Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Get default logic to work
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Oct 8, 2024
1 parent 2c770d9 commit cbdd550
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion server/remark-includes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ export function parseParamDefaults(expr: string): ParameterAssignments {
if (!!firstLineMatches && firstLineMatches[1].includes("=")) {
assignments = parseAssignments(firstLineMatches[1]);
}
console.log("paramUses", paramUses);
if (paramUses.length == 0) {
return assignments;
}
Expand Down
9 changes: 4 additions & 5 deletions uvu-tests/remark-includes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Suite("parsePartialParams correctly parses parameter assignments", () => {
});
});

Suite.only(
Suite(
"parseParamDefaults correctly parses default parameter assignments",
() => {
interface testCase {
Expand Down Expand Up @@ -425,16 +425,15 @@ It also includes the {{ second }} param.`,
{
description: "partial with three params and two defaults",
shouldThrow: false,
input: `
{{ first="1" second="2" }}
input: `{{ first="1" second="2" }}
This is a partial with a {{ first }}.
It also includes the {{ second }} param.
Finally, there is {{ third }}.
`,
expected: {
first: "1",
second: "2",
first: `"1"`,
second: `"2"`,
third: "",
},
},
Expand Down

0 comments on commit cbdd550

Please sign in to comment.