| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 31fdb88 commit aff9a53
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -129,6 +129,7 @@ void Dotenv::ParseContent(const std::string_view input) { | |||
| 129 | 129 | key = content.substr(0, equal); | |
| 130 | 130 | content.remove_prefix(equal + 1); | |
| 131 | 131 | key = trim_spaces(key); | |
| 132 | + content = trim_spaces(content); | ||
| 132 | 133 | ||
| 133 | 134 | if (key.empty()) { | |
| 134 | 135 | break; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -38,6 +38,7 @@ RETAIN_INNER_QUOTES={"foo": "bar"} | |||
| 38 | 38 | RETAIN_INNER_QUOTES_AS_STRING='{"foo": "bar"}' | |
| 39 | 39 | RETAIN_INNER_QUOTES_AS_BACKTICKS=`{"foo": "bar's"}` | |
| 40 | 40 | TRIM_SPACE_FROM_UNQUOTED= some spaced out string | |
| 41 | + SPACE_BEFORE_DOUBLE_QUOTES= "space before double quotes" | ||
| 41 | 42 | EMAIL=therealnerdybeast@example.tld | |
| 42 | 43 | SPACED_KEY = parsed | |
| 43 | 44 | EDGE_CASE_INLINE_COMMENTS="VALUE1" # or "VALUE2" or "VALUE3" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,3 +80,5 @@ assert.strictEqual(process.env.DONT_EXPAND_UNQUOTED, 'dontexpand\\nnewlines'); | |||
| 80 | 80 | assert.strictEqual(process.env.DONT_EXPAND_SQUOTED, 'dontexpand\\nnewlines'); | |
| 81 | 81 | // Ignore export before key | |
| 82 | 82 | assert.strictEqual(process.env.EXPORT_EXAMPLE, 'ignore export'); | |
| 83 | + // Ignore spaces before double quotes to avoid quoted strings as value | ||
| 84 | + assert.strictEqual(process.env.SPACE_BEFORE_DOUBLE_QUOTES, 'space before double quotes'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments