Fix broken handling of whitespace in GenericObject.

This actually makes the code matches its comment, i.e, whitespaces are now
normalized the same way XRefRole does.

Without the fix, when creating a directive/role via add_object_type, the
following testcase fails with "WARNING: 'baz' reference target not found:
foo bar".

    :baz:`foo bar`
    .. baz:: foo bar

The current workaround is to explicitly mention the broken target, e.g.,

    :baz:`foo bar <foobar>`
    .. baz:: foo bar
This commit is contained in:
Guillaume Melquiond 2020-02-18 08:07:11 +01:00
parent ee0656f51f
commit cea18198ce