From c66978cd9139dec8a4be5287cac26c413138d23c Mon Sep 17 00:00:00 2001 From: handylee Date: Sat, 14 Jan 2017 19:06:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20style=E5=B1=9E=E6=80=A7=E5=80=BC?= =?UTF-8?q?=E4=B8=AD=E5=8C=85=E5=90=AB:=E5=8F=B7=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=A2=AB=E6=88=AA=E6=96=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/formatter.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/formatter.coffee b/src/formatter.coffee index d77e69d4..aa6ac794 100644 --- a/src/formatter.coffee +++ b/src/formatter.coffee @@ -203,7 +203,8 @@ class Formatter extends SimpleModule styles = {} for style in styleStr.split(';') style = $.trim style - pair = style.split(':') + idx = style.indexOf(':') + pair = [style.slice(0, idx), style.slice(idx + 1)] continue unless pair.length = 2 styles[$.trim(pair[0])] = $.trim(pair[1]) if pair[0] in allowedStyles