Add an extra config to sphinx to fix #6618.
Merge pull request #7298 from nebffa/issue_6618

Fix #6618.