Skip to content

Commit

Permalink
Fix nonascii object names
Browse files Browse the repository at this point in the history
  • Loading branch information
m-rossi committed Feb 14, 2024
1 parent 56f69fe commit bb6d65e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
@@ -1,17 +1,17 @@
NonAscii
========
NonAsciiÄöüß
============

.. currentmodule:: sphinx_automodapi.tests.example_module.nonascii

.. autoclass:: NonAscii
.. autoclass:: NonAsciiÄöüß
:show-inheritance:

.. rubric:: Methods Summary

.. autosummary::

~NonAscii.get_ß
~NonAscii.get_äöü
~NonAsciiÄöüß.get_ß
~NonAsciiÄöüß.get_äöü

.. rubric:: Methods Documentation

Expand Down
Expand Up @@ -11,5 +11,5 @@
.. autosummary::
:toctree: api

NonAscii
NonAsciiÄöüß

4 changes: 2 additions & 2 deletions sphinx_automodapi/tests/example_module/nonascii.py
@@ -1,7 +1,7 @@
__all__ = ['NonAscii']
__all__ = ['NonAsciiÄöüß']


class NonAscii(object):
class NonAsciiÄöüß(object):
def get_äöü(self):
"""
Return a string with common umlauts like äöüß
Expand Down
6 changes: 3 additions & 3 deletions sphinx_automodapi/utils.py
Expand Up @@ -125,10 +125,10 @@ def find_autosummary_in_lines_for_automodsumm(lines, module=None, filename=None)
"""
autosummary_re = re.compile(r'^(\s*)\.\.\s+autosummary::\s*')
automodule_re = re.compile(
r'^\s*\.\.\s+automodule::\s*([A-Za-z0-9_.]+)\s*$')
r'^\s*\.\.\s+automodule::\s*([A-Za-zäüöÄÜÖß0-9_.]+)\s*$')
module_re = re.compile(
r'^\s*\.\.\s+(current)?module::\s*([a-zA-Z0-9_.]+)\s*$')
autosummary_item_re = re.compile(r'^\s+(~?[_a-zA-Z][a-zA-Z0-9_.]*)\s*.*?')
r'^\s*\.\.\s+(current)?module::\s*([a-zA-ZäüöÄÜÖß0-9_.]+)\s*$')
autosummary_item_re = re.compile(r'^\s+(~?[_a-zA-ZäüöÄÜÖß][a-zA-ZäüöÄÜÖß0-9_.]*)\s*.*?')
toctree_arg_re = re.compile(r'^\s+:toctree:\s*(.*?)\s*$')
template_arg_re = re.compile(r'^\s+:template:\s*(.*?)\s*$')
inherited_members_arg_re = re.compile(r'^\s+:inherited-members:\s*$')
Expand Down

0 comments on commit bb6d65e

Please sign in to comment.