-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struct with @kwdef does not follow template #98
Comments
Same also applies if I replace @doc "..." CameraConfig
@kwdef struct CameraConfig ... end with @doc "..."
@kwdef struct CameraConfig ... end |
Can you confirm that you are at 339cd6d for With this test file: module Test
import Base: @kwdef
using DocStringExtensions
abstract type Pose end
abstract type CameraIntrinsics end
@template TYPES =
"""
Fields:
$(TYPEDFIELDS)
---
$(DOCSTRING)
"""
@doc """
Camera configuration.
Defines the intrinsics and extrinsics of an ideal pinhole camera.
""" CameraConfig
@kwdef struct CameraConfig
"""Pose (position and orientation) of the camera eye."""
cameraEyePose::Pose
intrinsics::CameraIntrinsics
end
end You'll note the following
"""
Camera configuration.
Defines the intrinsics and extrinsics of an ideal pinhole camera.
"""
@kwdef struct CameraConfig
"""Pose (position and orientation) of the camera eye."""
cameraEyePose::Pose
intrinsics::CameraIntrinsics
end
And the template is correctly applied:
That is not the right syntax to add a docstring to Bottom line is: don't use |
Thanks for these responses @MichaelHatherly! I'm pretty sure I'm on the latest revision:
Manifest.toml says it's using git tree hash Here's what I'm seeing: Works
Doesn't work
Unfortunately, through no fault of this package, I'm not going to be able to use the good versions until JuliaLang/julia#36906 is fixed upstream -- having the wrong view source link is too big of a problem, so I'm stuck with the |
JuliaLang/julia#37048 should hopefully resolve that one. |
Omg, thanks!! |
Compared DocStringExtensions from current release and from master. In both cases, this
becomes this
The text was updated successfully, but these errors were encountered: