mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8505 from tk0miya/8501_extract_summary_el_at
Fix #8501: autosummary: summary extraction splits text after "el at."
This commit is contained in:
commit
c15c61ed64
1
CHANGES
1
CHANGES
@ -67,6 +67,7 @@ Bugs fixed
|
|||||||
* #8493: autodoc: references to builtins not working in class aliases
|
* #8493: autodoc: references to builtins not working in class aliases
|
||||||
* #8477: autosummary: non utf-8 reST files are generated when template contains
|
* #8477: autosummary: non utf-8 reST files are generated when template contains
|
||||||
multibyte characters
|
multibyte characters
|
||||||
|
* #8501: autosummary: summary extraction splits text after "el at." unexpectedly
|
||||||
* #8419: html search: Do not load ``language_data.js`` in non-search pages
|
* #8419: html search: Do not load ``language_data.js`` in non-search pages
|
||||||
* #8454: graphviz: The layout option for graph and digraph directives don't work
|
* #8454: graphviz: The layout option for graph and digraph directives don't work
|
||||||
* #8131: linkcheck: Use GET when HEAD requests cause Too Many Redirects, to
|
* #8131: linkcheck: Use GET when HEAD requests cause Too Many Redirects, to
|
||||||
|
@ -98,7 +98,7 @@ logger = logging.getLogger(__name__)
|
|||||||
periods_re = re.compile(r'\.(?:\s+)')
|
periods_re = re.compile(r'\.(?:\s+)')
|
||||||
literal_re = re.compile(r'::\s*$')
|
literal_re = re.compile(r'::\s*$')
|
||||||
|
|
||||||
WELL_KNOWN_ABBREVIATIONS = (' i.e.',)
|
WELL_KNOWN_ABBREVIATIONS = ('et al.', ' i.e.',)
|
||||||
|
|
||||||
|
|
||||||
# -- autosummary_toc node ------------------------------------------------------
|
# -- autosummary_toc node ------------------------------------------------------
|
||||||
|
@ -97,6 +97,9 @@ def test_extract_summary(capsys):
|
|||||||
doc = ['Blabla, i.e. bla.']
|
doc = ['Blabla, i.e. bla.']
|
||||||
assert extract_summary(doc, document) == ' '.join(doc)
|
assert extract_summary(doc, document) == ' '.join(doc)
|
||||||
|
|
||||||
|
doc = ['Blabla, et al. bla.']
|
||||||
|
assert extract_summary(doc, document) == ' '.join(doc)
|
||||||
|
|
||||||
# literal
|
# literal
|
||||||
doc = ['blah blah::']
|
doc = ['blah blah::']
|
||||||
assert extract_summary(doc, document) == 'blah blah.'
|
assert extract_summary(doc, document) == 'blah blah.'
|
||||||
|
Loading…
Reference in New Issue
Block a user