Skip to content

Trimming whitespace #23

@altano

Description

@altano

Hello!

When I have whitespace with a normal <Code> block like so:

      <Code>{`
  ┌───────┐
  │0|0|1|0│ 2 (media)
  └───────┘
  ┌───────┐
  │0|1|0|0│ 4 (productivity)
  └───────┘
  `;}</Code>

the leadering/trailing whitespace is preserved no problem.

But if I use <Code> in Markdown it goes down this code path and the code whitespace is trimmed. Any idea why this .trim() happens in this code path? Doesn't seem like it should ever make sense to trim whitespace in the code?

I can submit a PR to remove it and add tests if that makes sense?

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