algolia / algolia/react-element-to-jsx-string

Inconsequent string wrapping

Open
#614 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
518
Forks
87
Avg merge
3h 56m
Merged PRs (30d)
3

Description

## Input

```javascript
const Element = () => (



{`{t('Cool')}`}



{`t('Cool')`}



)
```

## Expected output

```javascript
const Element = () => (



{t('Cool')}



t('Cool')



)
```

## Actual output

```javascript
const Element = () => (



{`{t('Cool')}`}



t('Cool')



)
```

Why is the first `p` element getting wrapped in `{``}`, bet second not. I expect the first to act as the second (ie. not get wrapped.)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the JavaScript/JSX example from the issue and trace the repository's React element-to-JSX string formatting entry point. Compare the actual output with the expected output, then add or update coverage so equivalent text is not wrapped inconsistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.