Skip to content

Destructive formatting of multiline string #1331

@thoroughsoft

Description

@thoroughsoft

The mulit-line string formatting is broken.
This multi-line string

      """
          <div class="member-signature"><span class="annotations">@Generated(value="SomeGeneratedName",
                     date="a date",
                     comments="some comment about the method below")
          </span><span class="modifiers">public static</span>&nbsp;<span class="return-typ\
          e">void</span>&nbsp;<span class="element-name">annotatedMethod</span><wbr><span \
          class="parameters">(int&nbsp;i,
           java.lang.String&nbsp;s,
           boolean&nbsp;b)</span></div>"""

gets formatted to

        """
<div class="member-signature"><span class="annotations">@Generated(value="SomeGeneratedName",
date="a date",
comments="some comment about the method below")
</span><span class="modifiers">public static</span>&nbsp;<span class="return-typ\
e">void</span>&nbsp;<span class="element-name">annotatedMethod</span><wbr><span \
class="parameters">(int&nbsp;i,
java.lang.String&nbsp;s,
boolean&nbsp;b)</span></div>""",

As eagle-eyed persons will notice, this destroys the indentation completely.
From the looks of it, this formatting is done using a simple trim() on each line.
This should be fixed since this is a destructive error where the content is actually ruined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions