Skip to content

Commit 3754dd6

Browse files
fix: allow blank sections
1 parent 9e64043 commit 3754dd6

File tree

3 files changed

+4773
-4747
lines changed

3 files changed

+4773
-4747
lines changed

grammar.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ module.exports = grammar({
8888
// we are allowing multiple `$.request` nodes here to lower the parser size
8989
_section_content: ($) =>
9090
choice(
91-
seq($._blank_line, $._section_content),
92-
seq($.comment, $._section_content),
93-
seq($.variable_declaration, $._section_content),
94-
seq($.pre_request_script, $._section_content),
91+
seq($._blank_line, optional($._section_content)),
92+
seq($.comment, optional($._section_content)),
93+
seq($.variable_declaration, optional($._section_content)),
94+
seq($.pre_request_script, optional($._section_content)),
9595
seq(
9696
// field to easily find request node in each section
9797
field("request", $.request),

src/grammar.json

Lines changed: 40 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)