Closed smcgu closed 3 weeks ago
I'm for this. Thanks for the submission!
Both spaces should be removed for consistency and to avoid any confusion.
Awesome. I'll work on this shortly. Putting together some other PRs.
If you'd like to target this PR to merge into the 4-1-dev
branch, we can merge it for this upcoming release. Otherwise, since the changes are quick, I can make the adjustments and credit you.
I'll put this together this upcoming week of June 10th.
No problem, @smcgu! We were getting this release completed, so I made the necessary additions in the release. Thanks for the submission! Your changes are live in v4.2.
Description of the Change
Removed the hard-coded space that precedes the figure caption prefix to permit captions similar to Table captions, such as
Figure N. Xyz...
.The relevant change is on line 56,
self.prefix_figure = f"{prefix_figure} "
. All other changes were formatting to passblack
andflake8
checks.Before:
prefix
="."
figure_prefix
=" {prefix} "
{figure_label} N{figure_prefix}
->"Figure N . "
After:
prefix
="."
figure_prefix
="{prefix} "
{figure_label} N{figure_prefix}
->"Figure N. "
Alternate Designs
There were no other methods observed to prevent the preceding space that would allow for
Figure N. Xyz...
.It might be beneficial in the long-term to remove the hard-coded space after the prefix, too, to provide the most flexibility for Ghostwriter admins and users.
Possible Drawbacks
This will require current users that expect the preceding, hard-coded space to change their figure prefix from "-" to " -" if they need the spacing. Or, perhaps, this PR should be accompanied by a modification to add a space to the current figure prefix. I'll look into that.
Re-configuring the install defaults from "-" to " -" may be desired, too.
Verification Process
I'll follow up with tests and needed changes whenever I can get Docker and Ghostwriter functional on my development system.
Release Notes