Browse Source

Bugfix in comparisons like padding and padding-left

Taddeus Kroes 10 năm trước cách đây
mục cha
commit
bda5c1c0fc
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  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))