Skip to content

Commit

Permalink
Fix support for rgba() and rgb() in tts:textShadow (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
palemieux committed Aug 1, 2021
1 parent 977366c commit ebeb24b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@

imscUtils.parseTextShadow = function (str) {

var shadows = str.split(",");

var shadows = str.match(/([^\(,\)]|\([^\)]+\))+/g);
var r = [];

for (var i in shadows) {
Expand Down
4 changes: 2 additions & 2 deletions src/test/js/ParseTextShadowTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ QUnit.test("ParseTextShadow",

/* four components */

["10% -20% 5% lime", [shadow(10, "%", -20, "%", 5, "%", [0, 255, 0, 255])]]

["10% -20% 5% lime", [shadow(10, "%", -20, "%", 5, "%", [0, 255, 0, 255])]],
["+10% 0% -1% rgba(233,30,99,255)", [shadow(10, "%", 0, "%", -1, "%", [233, 30, 99, 255])]]


];
Expand Down

0 comments on commit ebeb24b

Please sign in to comment.