[fix #1115] Image resize in % doesn't work.

This commit is contained in:
koooooo-7 2020-04-13 23:04:34 +08:00
parent 9e62be9d00
commit 517f0d7dea

View File

@ -5,7 +5,7 @@ export function getAndRemoveConfig(str = '') {
str = str
.replace(/^'/, '')
.replace(/'$/, '')
.replace(/(?:^|\s):([\w-]+:?)=?([\w-]+)?/g, (m, key, value) => {
.replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g, (m, key, value) => {
if (key.indexOf(':') === -1) {
config[key] = (value && value.replace(/"/g, '')) || true;
return '';