Skip to content

Commit

Permalink
Fix redundant square bracket escape in regex (#17)
Browse files Browse the repository at this point in the history
This was giving me IDE warnings. Also IIRC there are ESLint rules that
detect this. Better for code quality to have it fixed.
  • Loading branch information
Eisenwave authored Aug 10, 2023
1 parent b690639 commit 2753429
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/wiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ enum parse_state {
done,
}

const image_regex = /!\[[^\]]*\]\(([^)]*)\)/;
const reference_definition_regex = /\s*\[([^\]]*)\]: (.+)/;
const reference_link_regex = /\[([^\]]*)\]\[([^\]]*)\]/g;
const image_regex = /!\[[^\]]*]\(([^)]*)\)/;
const reference_definition_regex = /\s*\[([^\]]*)]: (.+)/;
const reference_link_regex = /\[([^\]]*)]\[([^\]]*)]/g;

/**
* One-time use class for parsing articles.
Expand Down

0 comments on commit 2753429

Please sign in to comment.