Skip to content

(JSX) period after anchor tag is moved to newline before break #5047

@SimenB

Description

@SimenB

Prettier 1.14.2
Playground link

--parser babylon

Input:

const comp = () => (
  <p>
    <a href="https://example.com" style={{ color: "inherit", fontWeight: 600 }}>
      link
    </a>.
    <br />
  </p>
);

Output:

const comp = () => (
  <p>
    <a href="https://example.com" style={{ color: "inherit", fontWeight: 600 }}>
      link
    </a>
    .<br />
  </p>
);

Expected behavior:
For the output to match the input. (. after </a>, not before <br />)

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:jsxIssues affecting JSX (not general JS issues)

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions