benjamn / benjamn/recast

Reformatting JSX Children

Open
#167 1 comment 0 reactions 1 assignee Claimed by @benjamn View on GitHub
enhancement
Dominant language
TypeScript
Stars
5.3k
Forks
363
Avg merge
3d 8h
Merged PRs (30d)
3

Description

When parsing the following

```

OH HAI

```

The top level JSX element (If) has the following children:

```
0: "\n " Literal
1: "

OH HAI

" JSXElement
2: "\n " Literal
```

Is it safe to just simply throw away any instances of Literal "\n " and "\n" when visiting JSXElements, or is there a way to have the parser not pick these up in the first place?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.