From 5612e74586f01cf8e4a031ff65ecb7bf60fed2f5 Mon Sep 17 00:00:00 2001 From: sotashimozono Date: Thu, 27 Aug 2026 12:09:54 +0000 Subject: [PATCH] Reattach the docstring for `Future.abs2` A comment or blank line between the docstring and the definition stops Julia from attaching it, so the documentation is silently dropped. Co-Authored-By: Claude Opus 5 (1M context) --- src/ColorVectorSpace.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ColorVectorSpace.jl b/src/ColorVectorSpace.jl index c048951..5fb8b6f 100644 --- a/src/ColorVectorSpace.jl +++ b/src/ColorVectorSpace.jl @@ -485,18 +485,17 @@ Base.abs2(c::Union{AbstractGray,AbstractRGB}) = c ⋅ c module Future using ..ColorTypes using ..ColorVectorSpace: ⋅ - """ - ColorVectorSpace.Future.abs2(c) - Return a scalar "squared magnitude" for color types. For RGB and gray, this is just the mean-square - channelwise intensity. - """ - if VERSION >= v"1.5" @inline _depwarn(msg, funcsym; force=false) = Base.depwarn(msg, funcsym; force=force) else @inline _depwarn(msg, funcsym; force=false) = Base.depwarn(msg, funcsym) end + """ + ColorVectorSpace.Future.abs2(c) + Return a scalar "squared magnitude" for color types. For RGB and gray, this is just the mean-square + channelwise intensity. + """ function abs2(c::Union{Real,AbstractGray,AbstractRGB}) _depwarn(""" The return value of `abs2` is now consistent with `ColorVectorSpace.Future.abs2`.