sphinx-contrib / sphinx-pretty-searchresults

Sphinx: pretty search results is an extension for the Sphinx documentation tool. To display search results, Sphinx is fetching the source files of search hits and rendering excerpts in raw markup. This extension removes the markup from these source files (during build time), so the search results look decent.
https://pypi.python.org/pypi/sphinxprettysearchresults
MIT License
22 stars 5 forks source link

Horizontal line markup isn't removed #21

Closed Holger-S closed 6 years ago

Holger-S commented 6 years ago

Horizontal lines represented in .rst files by at least 4 hyphen characters like ---- at the beginning of a line aren't removed in the .txt files.

Instead, 71 = chars are left in the txt files at the beginning of that line like this: ======================================================================

I'm using sphinx 1.6.3 and the latest sphinx-pretty-searchresults build.

TimKam commented 6 years ago

I cannot reproduce this issue. There's even a passing test for this type of markup. Slightly changing the test example doesn't lead to any problems. Could you provide an example .rst file?

Holger-S commented 6 years ago

Hi, of course.

.rst file: https://gist.github.com/Holger-S/feeaf822b7821be437876d7bdbe62a30

resulting .txt file: https://gist.github.com/Holger-S/3b73391c8f2e0d18f44ac8f938437b17

TimKam commented 6 years ago

Thanks, now I can reproduce the issue. I will fix it asap.