Skip to content

MdxFlowExpression doesn't seem to preserve white space in values #150

@bnchi

Description

@bnchi

Given this test case :

from("  {`\n    a\n  `}", &ParseOptions::mdx()).unwrap()

the generated markdown tree seem to be missing the white spaces between the first \n and a

The tree outptut from the above Rust code is :

Root { children: [MdxFlowExpression { value: "`\na\n`", position: Some(1:3-3:5 (2-15)), stops: [(0, 3), (1, 4), (2, 9), (3, 10), (4, 13)] }], position: Some(1:1-3:5 (0-15)) }

I ran the same input on the JS version and the output is :

{
  type: 'root',
  children: [
    {
      type: 'mdxFlowExpression',
      value: '`\n  a\n`',
      position: [Object]
    }
  ],
  position: {
    start: { line: 1, column: 1, offset: 0 },
    end: { line: 3, column: 5, offset: 15 }
  }
}

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