Skip to content

Newline after custom tag doesn't work. #669

@hunkydoryrepair

Description

@hunkydoryrepair

I have a custom tag using a simple override. When a newline appears directly after (two spaces and a \n), the newline is not generated if it uses the <time /> syntax, however if it uses <time></time> then it works as expected.

Workaround is simple of course, since thankfully the 2nd method works fine.

Ironically, one of the samples in documentation is very close to reproducing this error. I've modified to show what happens with an added newline

const md = `
# DatePicker

The DatePicker works by supplying a date to bias towards,
as well as a default timezone.

<DatePicker biasTowardDateTime="2017-12-05T07:39:36.091Z" timezone="UTC+5" />  
This should be on the next line`

render(
  <Markdown
    children={md}
    options={{
      overrides: {
        DatePicker: {
          component: DatePicker,
        },
      },
    }}
  />,
  document.body
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions