mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
autosummary: Extract summary line after "e.g." (#11196)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
8cd677f929
commit
ac2b7599d2
1
CHANGES
1
CHANGES
@ -44,6 +44,7 @@ Bugs fixed
|
||||
Patch by Ralf Grubenmann.
|
||||
* #11529: Line Block in LaTeX builder outputs spurious empty token.
|
||||
Patch by Adrian Vollmer.
|
||||
* #11196: autosummary: Summary line extraction failed with "e.g."
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
@ -100,7 +100,7 @@ logger = logging.getLogger(__name__)
|
||||
periods_re = re.compile(r'\.(?:\s+)')
|
||||
literal_re = re.compile(r'::\s*$')
|
||||
|
||||
WELL_KNOWN_ABBREVIATIONS = ('et al.', ' i.e.',)
|
||||
WELL_KNOWN_ABBREVIATIONS = ('et al.', 'e.g.', 'i.e.')
|
||||
|
||||
|
||||
# -- autosummary_toc node ------------------------------------------------------
|
||||
|
@ -102,6 +102,15 @@ def test_extract_summary(capsys):
|
||||
doc = ['Blabla, i.e. bla.']
|
||||
assert extract_summary(doc, document) == ' '.join(doc)
|
||||
|
||||
doc = ['Blabla, (i.e. bla).']
|
||||
assert extract_summary(doc, document) == ' '.join(doc)
|
||||
|
||||
doc = ['Blabla, e.g. bla.']
|
||||
assert extract_summary(doc, document) == ' '.join(doc)
|
||||
|
||||
doc = ['Blabla, (e.g. bla).']
|
||||
assert extract_summary(doc, document) == ' '.join(doc)
|
||||
|
||||
doc = ['Blabla, et al. bla.']
|
||||
assert extract_summary(doc, document) == ' '.join(doc)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user