Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 39c3f79

Browse files
elektronikworkshopadiazulay
authored andcommitted
Fix issue 771
* Fixes the line splitting regex as outlined in #771 * Removed a redundand condition
1 parent dd3254d commit 39c3f79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arduino/board.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function parseBoardDescriptor(boardDescriptor: string, plat: IPlatform):
88
const boardLineRegex = /([^\.]+)\.(\S+)=(.+)/;
99

1010
const result = new Map<string, IBoard>();
11-
const lines = boardDescriptor.split(/[\r|\r\n|\n]/);
11+
const lines = boardDescriptor.split(/(?:\r|\r\n|\n)/);
1212
const menuMap = new Map<string, string>();
1313

1414
lines.forEach((line) => {
@@ -18,7 +18,7 @@ export function parseBoardDescriptor(boardDescriptor: string, plat: IPlatform):
1818
}
1919

2020
const match = boardLineRegex.exec(line);
21-
if (match && match.length > 3) {
21+
if (match) {
2222
if (line.startsWith("menu.")) {
2323
menuMap.set(match[2], match[3]);
2424
return;

0 commit comments

Comments
 (0)