Skip to content

Commit c132c46

Browse files
committed
Fix - pass 'param' as node name to stage 2
1 parent 4e69c7c commit c132c46

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/liquid-html-parser/src/stage-1-cst.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,7 @@ function toLiquidDocAST(source: string, matchingSource: string, offset: number)
13301330
},
13311331
paramNode: {
13321332
type: ConcreteNodeTypes.LiquidDocParamNode,
1333+
name: 'param',
13331334
locStart,
13341335
locEnd,
13351336
source,

packages/liquid-html-parser/src/stage-2-ast.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1239,13 +1239,13 @@ describe('Unit: Stage 2 (AST)', () => {
12391239
expectPath(ast, 'children.0.type').to.eql('LiquidRawTag');
12401240
expectPath(ast, 'children.0.name').to.eql('doc');
12411241
expectPath(ast, 'children.0.body.nodes.0.type').to.eql('LiquidDocParamNode');
1242-
expectPath(ast, 'children.0.body.nodes.0.name').to.eql('@param');
1242+
expectPath(ast, 'children.0.body.nodes.0.name').to.eql('param');
12431243
expectPath(ast, 'children.0.body.nodes.0.paramName.type').to.eql('TextNode');
12441244
expectPath(ast, 'children.0.body.nodes.0.paramName.value').to.eql('asdf');
12451245
expectPath(ast, 'children.0.body.nodes.0.paramDescription.type').to.eql('TextNode');
12461246
expectPath(ast, 'children.0.body.nodes.0.paramDescription.value').to.eql('');
12471247
expectPath(ast, 'children.0.body.nodes.1.type').to.eql('LiquidDocParamNode');
1248-
expectPath(ast, 'children.0.body.nodes.1.name').to.eql('@param');
1248+
expectPath(ast, 'children.0.body.nodes.1.name').to.eql('param');
12491249
expectPath(ast, 'children.0.body.nodes.1.paramName.type').to.eql('TextNode');
12501250
expectPath(ast, 'children.0.body.nodes.1.paramName.value').to.eql('paramWithDescription');
12511251
expectPath(ast, 'children.0.body.nodes.1.paramDescription.type').to.eql('TextNode');

0 commit comments

Comments
 (0)