<commit_before># react-simple-format

The port of Rails's [simple_format](http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format) to React.

## Usage

Turns double newlines into different paragraphs. See [examples](examples) for live examples.s

```js
const forwardText = "You can't connect the dots looking forward;\n\nYou can only connect them looking backward."

<SimpleFormat text={ forwardText } />
```

This will render:

```html
<div>
  <p>You can't connect the dots looking forward;</p>
  <p>You can only connect them looking backward.</p>
</div>
```

## Props

### `wrapperTag` (string/react element)

Default is `'div'`, but you can change it to something else:

```
<SimpleFormat text={ ... } wrapperTag='article' />

↓

<article>
  ...
</article>

---

<SimpleFormat text={ ... } wrapperTag={ SomeComponent } /><commit_msg>Fix readme<commit_after># react-simple-format

The port of Rails's [simple_format](http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-simple_format) to React.

## Usage

Turns double newlines into different paragraphs. See [examples](examples) for live examples.s

```js
const forwardText = "You can't connect the dots looking forward;\n\nYou can only connect them looking backward."

<SimpleFormat text={ forwardText } />
```

This will render:

```html
<div>
  <p>You can't connect the dots looking forward;</p>
  <p>You can only connect them looking backward.</p>
</div>
```

## Props

### `wrapperTag` (string/react class)

Default is `'div'`, but you can change it to something else:

```
<SimpleFormat text={ ... } wrapperTag='article' />

↓

<article>
  ...
</article>

---

<SimpleFormat text={ ... } wrapperTag={ SomeComponent } />
{'fraction_non_alphanumeric': 0.15278575531303848, 'fraction_numerical': 0.0, 'mean_word_length': 4.310975609756097, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7089975', 'n_tokens_mistral': 569, 'n_tokens_neox': 537, 'n_words': 171}