#49 keep line breaks in comments
Closed: Fixed 2 months ago by lruzicka. Opened 2 months ago by kparal.

Line breaks are currently consumed in comments. This comment contains:

After upgrading to mesa-25.0.0 and restarting the system, the system boots to black screen.
Downgrading to mesa-24.3.4 resolved the problem.

Process 1559 (gnome-shell) of user 42 dumped core.

Module [dso] from rpm libgudev-238-6.fc41.x86_64
Module dri_gbm.so from rpm mesa-25.0.0-2.fc41.x86_64
Module libpciaccess.so.0 from rpm libpciaccess-0.16-13.fc41.x86_64
Module libedit.so.0 from rpm libedit-3.1-54.20250104cvs.fc41.x86_64
Module libdrm_intel.so.1 from rpm libdrm-2.4.124-1.fc41.x86_64

but shows up as:

               After upgrading to mesa-25.0.0 and restarting the system, the
               system boots to black screen.   Downgrading to mesa-24.3.4
               resolved the problem.    Process 1559 (gnome-shell) of user 42
               dumped core.    Module [dso] from rpm libgudev-238-6.fc41.x86_64
               Module dri_gbm.so from rpm mesa-25.0.0-2.fc41.x86_64   Module
               libpciaccess.so.0 from rpm libpciaccess-0.16-13.fc41.x86_64
               Module libedit.so.0 from rpm
               libedit-3.1-54.20250104cvs.fc41.x86_64   Module libdrm_intel.so.1

I believe we want to break long lines (perhaps we don't need to insist on 80 columns max, but that's a different discussion), but we also want to keep the existing line breaks.


This was caused by the feature of the wrap function. The function itself has a replace_whitespace=False option which I tried but it did not solve the situation, because although the linebreaks were fixed, the indentation went berserk instead. Therefore, I am splitting the multiline comment into a list of lines and processing each line separately.

Fix is in #50.

Metadata Update from @lruzicka:
- Issue assigned to lruzicka

2 months ago

Metadata Update from @lruzicka:
- Custom field story_points adjusted to 1

2 months ago

Line breaks in multi line notes are also consumed, notes of FEDORA-2025-92d3942828 show up as:

      Notes: Automatic update for podman-5.4.0-1.fc41, buildah-1.39.0-1.fc41,
           : skopeo-1.18.0-1.fc41, containers-common-0.62.0-1.fc41.  #####
           : **Changelog for podman**  ``` * Tue Feb 11 2025 Packit
           : <hello@packit.dev> - 5:5.4.0-1 - Update to 5.4.0 upstream release
           : * Wed Feb 05 2025 Packit <hello@packit.dev> - 5:5.4.0~rc3-1 -
           : Update to 5.4.0-rc3 upstream release  * Tue Feb 04 2025 Lokesh
           : Mandvekar <lsm5@fedoraproject.org> - 5:5.4.0~rc2-2 - TMT: initial
           : enablement  * Thu Jan 30 2025 Packit <hello@packit.dev> -
           : 5:5.4.0~rc2-1 - Update to 5.4.0-rc2 upstream release  ```  #####
           : **Changelog for buildah**  ``` * Mon Feb 03 2025 Packit
           : <hello@packit.dev> - 2:1.39.0-1 - Update to 1.39.0 upstream release
           : ```  ##### **Changelog for skopeo**  ``` * Wed Feb 12 2025 Packit
           : <hello@packit.dev> - 1:1.18.0-1 - Update to 1.18.0 upstream release
           : * Thu Feb 06 2025 Lokesh Mandvekar <lsm5@fedoraproject.org> -
           : 1:1.17.0-3 - fix gating.yaml  * Thu Feb 06 2025 Lokesh Mandvekar
           : <lsm5@fedoraproject.org> - 1:1.17.0-2 - TMT: initial enablement
           : ```  ##### **Changelog for containers-common**  ``` * Fri Jan 31
           : 2025 Packit <hello@packit.dev> - 5:0.62.0-1 - Update to 0.62.0
           : upstream release  ```

Line breaks in multiline notes are also consumed

I know. The question is, do we want to split them? The lined notes will eat up more vertical space.

I would say either show it properly or don't show it at all. This mangled text is unreadable anyway. My preference would be to show it properly.

Therefore, I am splitting the multiline comment into a list of lines and processing each line separately.

I don't know whether you read the documentation, but that's exactly what they recommend:
https://docs.python.org/3/library/textwrap.html#textwrap.TextWrapper.replace_whitespace

Oh, and you can move

from textwrap import wrap

from "third-party python modules" to "standard python modules". It's builtin in Python. I overlooked that when touching the imports lately.

Modules moved, notes fixed.

Log in to comment on this ticket.

Metadata
Related Pull Requests
  • #50 Merged 2 months ago