Skip to content

Commit

Permalink
Fix issue using using non-English named variables and text codes in d…
Browse files Browse the repository at this point in the history
…ialogue
  • Loading branch information
chrismaltby committed Jun 6, 2024
1 parent a6b0562 commit a81ae62
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix issue where searching through menus would use very low contrast text colours when using Dark theme
- Fix issue preventing palette names from being over 25 characters long
- Fix issue where sceneTypes in `engine.json` for plugins could cause duplicate scene types to appear
- Fix issue using using non-English named variables and text codes in dialogue.

## [4.0.0-beta2] - 2024-05-20

Expand Down
10 changes: 5 additions & 5 deletions src/components/ui/form/DialogueTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
>
<CustomMention
className="Mentions__TokenVar"
trigger={/(\$([A-Za-z0-9]+))$/}
trigger={/(\$([\p{L}0-9]+))$/u}
markup="$__id__$"
data={searchVariables(variables, "$")}
regex={/\$([VLT0-9][0-9]*)\$/}
Expand Down Expand Up @@ -484,7 +484,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
/>
<CustomMention
className="Mentions__TokenChar"
trigger={/(#([A-Za-z0-9]+))$/}
trigger={/(#([\p{L}0-9]+))$/u}
markup="#__id__#"
data={searchVariables(variables, "#")}
regex={/#([VLT0-9][0-9]*)#/}
Expand Down Expand Up @@ -514,7 +514,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
/>
<CustomMention
className="Mentions__TokenSpeed"
trigger={/(!([A-Za-z0-9]+))$/}
trigger={/(!([\p{L}0-9]+))$/u}
data={speedCodes}
markup="!__id__!"
regex={/!(S[0-5]+)!/}
Expand All @@ -541,7 +541,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
/>
<CustomMention
className="Mentions__TokenFont"
trigger={/(!([A-Za-z0-9]+))$/}
trigger={/(!([\p{L}0-9]+))$/u}
data={fontItems}
markup="!__id__!"
regex={/!(F:[0-9a-f-]+)!/}
Expand All @@ -568,7 +568,7 @@ export const DialogueTextarea: FC<DialogueTextareaProps> = ({
/>
<CustomMention
className="Mentions__TokenGoto"
trigger={/(!([A-Za-z0-9]+))$/}
trigger={/(!([\p{L}0-9]+))$/u}
data={moveCodes}
markup={`__id__`}
regex={/(\\00[34]\\[0-7][0-7][0-7]\\[0-7][0-7][0-7])/}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/form/MathTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export const MathTextarea: FC<MathTextareaProps> = ({
>
<CustomMention
className="Mentions__TokenVar"
trigger={/(\$([A-Za-z0-9]+))$/}
trigger={/(\$([\p{L}0-9]+))$/u}
markup="$__id__$"
data={searchVariables(variables)}
regex={/\$([VLT0-9][0-9]*)\$/}
Expand Down

0 comments on commit a81ae62

Please sign in to comment.