Skip to content

Commit

Permalink
Improve parentheses handling
Browse files Browse the repository at this point in the history
Still not perfect, but hoüpefully a good compromise. Should be less annoying during normal prompt writing.
Closes #107
  • Loading branch information
DominikDoom committed Sep 12, 2023
1 parent bd1dbe9 commit 46d07d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/tagAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function isEnabled() {
const WEIGHT_REGEX = /[([]([^()[\]:|]+)(?::(?:\d+(?:\.\d+)?|\.\d+))?[)\]]/g;
const POINTY_REGEX = /<[^\s,<](?:[^\t\n\r,<>]*>|[^\t\n\r,> ]*)/g;
const COMPLETED_WILDCARD_REGEX = /__[^\s,_][^\t\n\r,_]*[^\s,_]__[^\s,_]*/g;
const NORMAL_TAG_REGEX = /[^\s,|<>)\]]+|</g;
const NORMAL_TAG_REGEX = /[^\s,|<>\]:]+_\([^\s,|<>\]:]*\)?|[^\s,|<>():\]]+|</g;
const RUBY_TAG_REGEX = /[\w\d<][\w\d' \-?!/$%]{2,}>?/g;
const TAG_REGEX = new RegExp(`${POINTY_REGEX.source}|${COMPLETED_WILDCARD_REGEX.source}|${NORMAL_TAG_REGEX.source}`, "g");

Expand Down

0 comments on commit 46d07d7

Please sign in to comment.