Skip to content

Commit

Permalink
Merge pull request #9 from ieedan/comment-support
Browse files Browse the repository at this point in the history
Fixes #8
  • Loading branch information
ieedan authored Mar 28, 2024
2 parents 5fe0043 + d5a1bcd commit 2c7a0da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .vnv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
@startsWith("https://")
# Must be min 10 for name of domain and domain postfix Ex: (https://d.t)
@min(10)
ALLOWED_ORIGINS=["https://github.com", "https://aidanbleser.com"]
# ALLOWED_ORIGINS=["https://github.com", "http://aidanbleser.com"]
ALLOWED_ORIGINS=[
"https://github.com",
"https://aidanbleser.com"
]
@min(1000)
@public
POLLING_INTERVAL=5000
Expand Down
7 changes: 5 additions & 2 deletions src/parsing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ pub fn parse(content: &str) -> ParseResult {
is_array = true;
} else if c == ']' && is_value && is_array && !is_string {
is_array = false;
} else if !is_comment {
// no need to add comments to current
} else if c == '#' && !is_value && !is_array && !is_string {
is_comment = true;
} else if !is_comment && !(c == '\n' && !is_string) {
current.push_str(&c.to_string());
}

Expand Down Expand Up @@ -199,6 +200,8 @@ pub fn parse(content: &str) -> ParseResult {
current_key = (String::new(), FilePosition::new());
current_decorators = Vec::new();
is_value = false;
is_array = false;
is_string = false;
}

// clear no matter what
Expand Down

0 comments on commit 2c7a0da

Please sign in to comment.