-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strip out comments in config files before passing to
shellexpand
(#38)
Applied the fix to all config files with comment support. The one downside is, that I had to repeat the same code in each function. That is due to `#[proc_macro]` crate rules: according to Rust's restrictions, these crates can only export items that are procedural macros themselves. Fixes #37
- Loading branch information
Showing
5 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
test = "from file", | ||
another = 25, | ||
-- Single-line comment ${FOO} | ||
elements = { | ||
key = "value", | ||
key2 = "value2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
test=from file | ||
another=25 | ||
; This is a comment ${FOO} | ||
|
||
[elements] | ||
key=value | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# private_key = "${FOO}" | ||
test = 'from file' | ||
another = 25 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
--- | ||
test: from file | ||
another: 25 | ||
# This is a comment ${FOO} | ||
elements: | ||
key: value | ||
key2: value2 | ||
|