Skip to content

position is missing is mdxJsxAttribute node #2034

Closed
@JounQin

Description

@JounQin

Initial checklist

Affected packages and versions

remark-mdx

Link to runnable example

No response

Steps to reproduce

<div abc="xxx"></div>

Expected behavior

Add position in mdxJsxAttribute node

Actual behavior

{
  "type": "root",
  "children": [
    {
      "type": "mdxJsxFlowElement",
      "name": "div",
      "attributes": [
        {
          "type": "mdxJsxAttribute",
          "name": "abc",
          "value": "xxx"
        }
      ],
      "children": [],
      "position": {
        "start": {
          "line": 1,
          "column": 1,
          "offset": 0
        },
        "end": {
          "line": 1,
          "column": 22,
          "offset": 21
        }
      },
      "data": {
        "_mdxExplicitJsx": true
      }
    }
  ],
  "position": {
    "start": {
      "line": 1,
      "column": 1,
      "offset": 0
    },
    "end": {
      "line": 2,
      "column": 1,
      "offset": 22
    }
  }
}

Runtime

Node v16

Package manager

yarn v1

OS

macOS

Build and bundle tools

No response

Metadata

Metadata

Assignees

Labels

👀 no/externalThis makes more sense somewhere else

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions