Skip to content
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

The multibyte role short_description causes warning "Title underline too short." #228

Closed
akira6592 opened this issue Dec 16, 2023 · 4 comments · Fixed by #229
Closed

The multibyte role short_description causes warning "Title underline too short." #228

akira6592 opened this issue Dec 16, 2023 · 4 comments · Fixed by #229
Labels
bug Something isn't working

Comments

@akira6592
Copy link

akira6592 commented Dec 16, 2023

The multibyte role short_description causes warning "Title underline too short."

argument_specs.yml:

---
argument_specs:
  main:
    short_description: short description of Main entry point for テストロール
    description:
      - description of Main entry point for テストロール
    author:
      - akira6592
    options:
      myapp_int:
        type: "int"
        required: false
        default: 42
        description:
          - "The integer value, defaulting to 42."
% dest/build.sh

...(omit)...
/Users/akira/ansible/dest/rst/collections/local/mycollection/myapp_role.rst:19: WARNING: Title underline too short.

local.mycollection.myapp role -- short description of Main entry point for テストロール
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/Users/akira/ansible/dest/rst/collections/local/mycollection/myapp_role.rst:41: WARNING: Title underline too short.

Entry point ``main`` -- short description of Main entry point for テストロール
------------------------------------------------------------------------

...(omit)...

It is not only role short_description, but maybe also other short_description.

@akira6592 akira6592 changed the title The multibyte role entry point name causes warning "Title underline too short." The multibyte role short_description causes warning "Title underline too short." Dec 16, 2023
@felixfontein felixfontein added the bug Something isn't working label Dec 16, 2023
@felixfontein
Copy link
Collaborator

docutils emits that warning when column_width(title) > len(underline), with from docutils.utils import column_width. Instead of recreating column_width, let's simply import it from docutils (which we depend on anyway) and use it instead of len(...) (what we use right now).

@felixfontein
Copy link
Collaborator

I created #229 to fix this.

@felixfontein
Copy link
Collaborator

antsibull-docs 2.6.1 fixes this.

@akira6592
Copy link
Author

@felixfontein
Thanks for the quick fix and release!
I have confirmed that the problem has been fixed in version 2.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants