Skip to content

Copy icon on /etc/yum.repos.d/rabbitmq.repo text box does not preserve whitespace at beginning of line #2368

@jamshid

Description

@jamshid

Describe the bug

At least when using MS Edge or Safari on macOS going to https://www.rabbitmq.com/docs/install-rpm#add-yum-repositories-for-rabbitmq-and-modern-erlang and pressing the copy icon in the # In /etc/yum.repos.d/rabbitmq.repo text box resuls in an invalid .repo file because whitespace at the beginning of the line is not preserved.

Reproduction steps

  1. Go to https://github.com/rabbitmq/erlang-rpm/blob/erlang-26/README.md#direct-downloads-from-github
  2. Copy the text in the # In /etc/yum.repos.d/rabbitmq.repo box both by selecting all the text and by using the little copy icon in the upper right.
  3. Note the copy icon results in text missing initial whitespace such as in the gpgkey lines. That results in dnf ignoring the .repo file.
...
[modern-erlang-noarch]
name=modern-erlang-el9-noarch
# Use a set of mirrors maintained by the RabbitMQ core team.
# The mirrors have significantly higher bandwidth quotas.
baseurl=https://yum1.rabbitmq.com/erlang/el/9/noarch
https://yum2.rabbitmq.com/erlang/el/9/noarch
repo_gpgcheck=1
enabled=1
gpgkey=https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key
https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
gpgcheck=1
sslverify=1
...

Expected behavior

initial whitespace should be preserved:

...
[modern-erlang-noarch]
name=modern-erlang-el8-noarch
# Use a set of mirrors maintained by the RabbitMQ core team.
# The mirrors have significantly higher bandwidth quotas.
baseurl=https://yum1.rabbitmq.com/erlang/el/8/noarch
        https://yum2.rabbitmq.com/erlang/el/8/noarch
repo_gpgcheck=1
enabled=1
gpgkey=https://github.com/rabbitmq/signing-keys/releases/download/3.0/cloudsmith.rabbitmq-erlang.E495BB49CC4BBE5B.key
       https://github.com/rabbitmq/signing-keys/releases/download/3.0/rabbitmq-release-signing-key.asc
gpgcheck=1
sslverify=1
...

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions