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

Ensure that the tittle id is unique on the with different subcommand #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ice-tong
Copy link

@ice-tong ice-tong commented Aug 15, 2024

Motivation

I found the URL hash property of the rendered action group tittle could be repeat conflict in one page. The following is a pseudo example to reproduce:

# xxx-cli
Some introduction of `xxx-cli` here...

## xxx-cli subcommand1
Some introduction of `xxx-cli subcommand1` here...
:::{eval-rst}
.. argparse::
   :module: xxx.cli
   :func: get_parser
   :prog: xxx-cli
   :path: subcommand1
:::

## xxx-cli subcommand2
Some introduction of `xxx-cli subcommand2` here...
:::{eval-rst}
.. argparse::
   :module: xxx.cli
   :func: get_parser
   :prog: xxx-cli
   :path: subcommand2
:::

Modification

  • sphinxarg/ext.py
    • Add the data['name'] to the title_as_id.
  • test/test_default_html.py
    • Update the unit test of subcommand.

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@2a2a202). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage        ?   47.07%           
=======================================
  Files           ?       12           
  Lines           ?      958           
  Branches        ?      227           
=======================================
  Hits            ?      451           
  Misses          ?      467           
  Partials        ?       40           
Flag Coverage Δ
unittests 47.07% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant