Skip to content

RichText: Adapt the new line handling #43

Open

Description

@DennyWeinberg

In the RichText class we need to replace the line
text = escape(text).replace('\n','<w:br/>')

by
text = escape(text).replace('\r\n', '<w:br/>').replace('\r', '<w:br/>').replace('\n', '<w:br/>')

because we uses sometimes only \r and in this case the first line does not work.

Activity

  1. cvas22 commented on Nov 25, 2026

    @cvas22

    @DennyWeinberg \r\n and a bare \r now turn into line breaks just like \n in docform, the maintained fork, for plain strings and RichText (cvas22/docform#207).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions