Skip to content

Commit

Permalink
JS: Fix placeable highligting in editor
Browse files Browse the repository at this point in the history
It worked only for single string and not as regexp as originally intended.
  • Loading branch information
nijel committed Dec 2, 2020
1 parent 39d6eff commit 123340c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weblate/static/editor/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ WLT.Editor = (function () {
});
let placeables = textarea.getAttribute("data-placeables");
if (placeables) {
placeables = new RegExp("^" + placeables);
codemirror.addOverlay({
token: function (stream) {
if (stream.match(placeables)) {
Expand Down

0 comments on commit 123340c

Please sign in to comment.