docrep icon indicating copy to clipboard operation
docrep copied to clipboard

Sections with trailing spaces are not identified

Open Chilipp opened this issue 5 years ago • 0 comments

If you have a trailing space behind the section (e.g. "Parameters " instead of "Parameters"), docrep will not recognize the section. This should be fixed.

Example:

import docrep
d = docrep.DocstringProcessor()

@d.get_sections(base='test')
def test(i):
    '''Some test function
    
    Parameters 
    ----------
    i: int   
        some param
    '''
    pass

print(d.params["test.parameters"])  # gives ''

Chilipp avatar Sep 25 '20 08:09 Chilipp