markup icon indicating copy to clipboard operation
markup copied to clipboard

RST parser introduces newlines inside SVG image links

Open mondeja opened this issue 4 years ago • 0 comments

Minimal example reproducing the issue

Next piece of code...

|build-status| |coverage| |license| |wheel|

.. |build-status| image:: https://secure.travis-ci.org/celery/django-celery-beat.svg?branch=master
    :alt: Build status
    :target: https://travis-ci.org/celery/django-celery-beat

.. |coverage| image:: https://codecov.io/github/celery/django-celery-beat/coverage.svg?branch=master
    :target: https://codecov.io/github/celery/django-celery-beat?branch=master

.. |license| image:: https://img.shields.io/pypi/l/django-celery-beat.svg?foo=bar
    :alt: BSD License
    :target: https://opensource.org/licenses/BSD-3-Clause

.. |wheel| image:: https://img.shields.io/pypi/wheel/django-celery-beat.svg
    :alt: django-celery-beat can be installed via wheel
    :target: http://pypi.python.org/pypi/django-celery-beat/

is rendered as:

<p><a class="reference external" href="https://travis-ci.org/celery/django-celery-beat"><img alt="Build status" src="https://secure.travis-ci.org/celery/django-celery-beat.svg?branch=master" /></a> <a class="reference external" href="https://codecov.io/github/celery/django-celery-beat?branch=master"><img alt="coverage" src="https://codecov.io/github/celery/django-celery-beat/coverage.svg?branch=master" /></a> <a class="reference external" href="https://opensource.org/licenses/BSD-3-Clause"><img alt="BSD License" src="https://img.shields.io/pypi/l/django-celery-beat.svg?foo=bar" /></a> <a class="reference external" href="http://pypi.python.org/pypi/django-celery-beat/"><img alt="django-celery-beat can be installed via wheel" src="https://img.shields.io/pypi/wheel/django-celery-beat.svg">
</a></p>
  • Note the newline inside a tag after last image.
  • If I add ?foo=bar after the image URL (see the third badge), the newline is not added.

You can see how is rendered this here (note the underline after some badges hovering the mouse).

mondeja avatar Jul 15 '20 14:07 mondeja