Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions arduino-ide-extension/src/browser/serial/decode/decode-output.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ export class DecodeOutput extends React.Component<
elements: [],
};
}

// If a string of <digit>.<digit>.<digit> or <digit>.<digit> is found, replaces it with "*"
changeVersionToAny = (path: string) => {
const regex = new RegExp(/(\d\.\d\.\d)|(\d\.\d)/g);
const found = path.match(regex);
if(found) {
return path.replace(found[0], "*")
}
return path
}

isClientPath = async (path:string): Promise<boolean> => {
return await spawnCommand("cd", [
Expand Down Expand Up @@ -60,6 +70,7 @@ export class DecodeOutput extends React.Component<
line.shift();
}
let pathSplit = line[3].split(":");
pathSplit[0] = this.changeVersionToAny(pathSplit[0]);
let obj: Element = {
address: line[0],
function: line[1],
Expand Down