ソースを参照

Bugfix in comparisons like padding and padding-left

Taddeus Kroes 10 年 前
コミット
bda5c1c0fc
1 ファイル変更6 行追加1 行削除
  1. 6 1
      util.ml

+ 6 - 1
util.ml

@@ -260,7 +260,12 @@ let sort_stylesheet =
             | 0 -> cmp tail_a tail_b
             | n -> n
           end
-        | _ -> String.compare a b
+        | Some (stem_a, tail_a), None ->
+          String.compare stem_a b
+        | None, Some (stem_b, tail_b) ->
+          String.compare a stem_b
+        | _ ->
+          String.compare a b
       in
       let cmp_decls (a, _, _) (b, _, _) = cmp a b in
       Statement (Ruleset (selectors, List.stable_sort cmp_decls decls))