Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
regex bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
serayuzgur committed Jul 13, 2018
1 parent 6cfadd7 commit c2dd1ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toml/decorations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function decoration(
versions: string[],
upToDateDecorator: string,
):Array<DecorationOptions> {
const regex = new RegExp(`.*${crate}.*=.*`, "g");
const regex = new RegExp(`.*${crate}\\\s*=.*`, "g");
const decorations = [];
while (true) {
// Also handle json valued dependencies
Expand All @@ -46,7 +46,7 @@ function decoration(
versions[0].indexOf(`${currentVersion}.`) === 0;

const hoverMessage = new MarkdownString(
"**Available Versions** (from crates.io)",
`**Available Versions**`,
);
hoverMessage.isTrusted = true;
versions.map(item => {
Expand Down

0 comments on commit c2dd1ab

Please sign in to comment.