From d307135daf0657a58c23f651569558cb928b8505 Mon Sep 17 00:00:00 2001 From: Martin Bodin Date: Thu, 30 Nov 2023 14:33:42 +0100 Subject: [PATCH] Fixing some errors reported by the CI. --- lib/svg_sigs.mli | 2 ++ syntax/attribute_value.ml | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/svg_sigs.mli b/lib/svg_sigs.mli index 949ca3b07..ebd6dd1a2 100644 --- a/lib/svg_sigs.mli +++ b/lib/svg_sigs.mli @@ -1116,6 +1116,8 @@ module type Wrapped_functions = sig val string_of_orient : (Svg_types.Unit.angle option, string) Xml.W.ft val string_of_paint : ([< Svg_types.paint], string) Xml.W.ft + + val string_of_opacity : (float, string) Xml.W.ft val string_of_fill_rule : ([< Svg_types.fill_rule], string) Xml.W.ft diff --git a/syntax/attribute_value.ml b/syntax/attribute_value.ml index 0482eb17b..922c00f00 100644 --- a/syntax/attribute_value.ml +++ b/syntax/attribute_value.ml @@ -501,12 +501,12 @@ let fill_opacity = in let v = - if group_matched 2 s then [%expr [%e n] /. 100.] - else [%expr [%e n]] in + if group_matched 2 s then ([%e n] /. 100.) + else [%e n] in - if v >= 0. && v <= 1. then Some v + if v >= 0. && v <= 1. then Some [%expr v] else - Common.error loc "Value of %s must be between 0 and 1." name in + Common.error loc "Value of %s must be between 0 and 1." name end [@metaloc loc] let fill_rule ?separated_by:_ ?default:_ loc _name s =