Add multiline support for with expression
Improve templating support for block rendering for `with` expression
that has multiline code. This improves templating support to render
multiline code conditionally.
This did not work before but works now:
```
{{ with $middleLine }}
first line
second line
{{ end }}
```
This commit is contained in:
@@ -23,6 +23,14 @@ export class SyntaxParserTestsRunner {
|
||||
return this;
|
||||
}
|
||||
|
||||
public expectNoMatch(...testCases: INoMatchTestCase[]) {
|
||||
this.expectPosition(...testCases.map((testCase) => ({
|
||||
name: testCase.name,
|
||||
code: testCase.code,
|
||||
expected: [],
|
||||
})));
|
||||
}
|
||||
|
||||
public expectResults(...testCases: IExpectResultTestCase[]) {
|
||||
for (const testCase of testCases) {
|
||||
it(testCase.name, () => {
|
||||
@@ -104,6 +112,11 @@ interface IExpectPositionTestCase {
|
||||
expected: readonly ExpressionPosition[];
|
||||
}
|
||||
|
||||
interface INoMatchTestCase {
|
||||
name: string;
|
||||
code: string;
|
||||
}
|
||||
|
||||
interface IExpectPipeHitTestData {
|
||||
codeBuilder: (pipeline: string) => string;
|
||||
parameterName: string;
|
||||
|
||||
Reference in New Issue
Block a user