Skip to content

Commit

Permalink
Improved config & resource parser by adding support for = between k…
Browse files Browse the repository at this point in the history
…ey and value and for `#` as a comment.
  • Loading branch information
petersirka committed Sep 2, 2024
1 parent 3bb3dbb commit 3b0668c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- fixed `CACHE.read()`
- added a new argument `size {Number}` to the `WebSocket.on('message', function(client, msg, [size]))` event
- fixed `@{href()}` command in the ViewEngine
- improved config & resource parser by adding support for `=` between key and value and for `#` as a comment

========================
0.0.5
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ F.loadresource = function(name, value) {

let index = line.indexOf(':');
if (index === -1) {
index = line.indexOf('\t:');
index = line.indexOf('=');
if (index === -1)
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3218,7 +3218,7 @@ SP.parseConfig = function(def, onerr) {

index = str.indexOf(':');
if (index === -1) {
index = str.indexOf('\t:');
index = str.indexOf('=');
if (index === -1)
continue;
}
Expand Down

0 comments on commit 3b0668c

Please sign in to comment.